# TraveLLM: Could you plan my new public transit route in face of a network
disruption?

Bowen Fang, Zixiao Yang, Shukai Wang, Xuan Di Member, IEEE (Corresponding
author: Xuan Di.)Bowen Fang and Zixiao Yang are with the Department of
Industrial Engineering and Operations Research, Columbia University, New York
City, NY, 10027 USA (e-mail<EMAIL_ADDRESS>zy2531@columbia.edu). Shukai
Wang is with the Data Science Institute, Columbia University, New York, NY,
10027 USA (e-mail: sw3715@columbia.edu).Xuan Di is with the Department of
Civil Engineering and Engineering Mechanics, Columbia University, New York,
NY, 10027 USA, and also with the Data Science Institute, Columbia University,
New York, NY, 10027 USA (e-mail: sharon.di@columbia.edu).

###### Abstract

Imagine there is a disruption in train 1 near Times Square metro station. You
try to find an alternative subway route to the JFK airport on Google Maps, but
the app fails to provide a suitable recommendation that takes into account the
disruption and your preferences to avoid crowded stations. We find that in
many such situations, current navigation apps may fall short and fail to give
a reasonable recommendation. To fill this gap, in this paper, we develop a
prototype, TraveLLM, to plan routing of public transit in face of disruption
that relies on Large Language Models (LLMs). LLMs have shown remarkable
capabilities in reasoning and planning across various domains. Here we hope to
investigate the potential of LLMs that lies in incorporating multi-modal user-
specific queries and constraints into public transit route recommendations.
Various test cases are designed under different scenarios, including varying
weather conditions, emergency events, and the introduction of new
transportation services. We then compare the performance of state-of-the-art
LLMs, including GPT-4, Claude 3 and Gemini, in generating accurate routes. Our
comparative analysis demonstrates the effectiveness of LLMs, particularly
GPT-4 in providing navigation plans. Our findings hold the potential for LLMs
to enhance existing navigation systems and provide a more flexible and
intelligent method for addressing diverse user needs in face of disruptions.

##  I INTRODUCTION

Imagine visiting New York City on April 3, 2024 when severe flooding and high
winds disrupted transportation. While planning your route, you also learn that
the Columbus Circle station exit is too windy and want to avoid it.
Unfortunately, apps like Google Maps lack options to navigate around
disruptions with a different subway route or integrate with alternative
services, for instance, shared Citi bike. This underscores the need for an
intelligent, flexible system to address diverse user needs and seamlessly
incorporate new transportation services.

LLMs, such as GPT-4[1], Claude 3[2], and Gemini [3], have demonstrated
remarkable capabilities in understanding and generating human-like text[4],
[5], [6], as well as reasoning and planning across various domains, including
autonomous driving[7, 8]. By leveraging the natural language understanding
capabilities of LLMs, users can input specific requirements, preferences, and
real-time information about the situation at hand. For instance, they might
say, ”I finished my work at WTC and headed home at Cathedral Parkway. West
Manhattan is flooded and 1/2/3/A/B/C/D are not in operation so I want to take
alternative paths.” The LLM can then process this input, interpret the context
and generate a customized route that takes into account the specific needs of
the users.

In this paper, we introduce the use of LLMs as a tool for customized route
planning during disruption. Our objectives are twofold. First, we aim to
investigate the potential of LLMs in incorporating multi-modal user-specific
queries and constraints into path recommendation. We designed test cases under
different scenarios to evaluate whether LLMs can succeed in various weather
conditions, emergency events, and when adding new transportation services.
Second, we compare the performance of major state-of-the-art LLMs, assessing
their ability to generate accurate and personalized route recommendations.

The main contributions of this paper are as follows:

  1. 1.

We propose a novel LLM-based approach for customized route planning when
facing disruption, capable of incorporating diverse user preferences,
situational factors, and alternative transportation options.

  2. 2.

We design a set of test cases to evaluate the performance of our approach
under various scenarios, including different weather conditions, emergency
events, and the introduction of new transportation services.

  3. 3.

We conduct a comparative analysis of state-of-the-art LLMs to assess their
effectiveness in generating accurate route recommendations.

##  II METHODOLOGY

In this section, we will introduce our method TraveLLM for generating route
recommendation in face of network disruptions.

###  II-A TravelLLM: Customized Route Planning Using LLM Agents in face of
network disruptions

Figure 1: System architecture for TraveLLM prototype

We have 4 parts of information as input to generate a route. The first input
is the instruction, which serves to regularize the output format and set route
constraints. This instruction can include requirements such as minimizing the
number of stops, reducing walking distance, or prioritizing certain modes of
transportation. The second is a description of the available transportation
services. We focus primarily on the subway system and utilize subway maps from
official website as our main source of information. Different transportation
services are given by separate map images. The third is a description of
user’s current situation and specific demands. This includes the user’s
starting location, destination, and any preferences or limitations they may
have. The fourth is a description of the disruptions that could potentially
impact the recommended route.

The format of these inputs can vary between natural language and images,
depending on the nature of the information. For instance, we use natural
language for the instructions and user’s situation and demands, while the
transportation services are represented through map images. By taking these
inputs, we use LLMs to generate a route recommendation in the form of natural
language. The LLMs consider the provided constraints, the user’s specific
demands, and the available transportation services to create a route
recommendation.

To obtain the inputs, we begin by setting format guidance and constraints in
the instructions, such as minimizing the number of stops or reducing the
overall walking distance. For the transportation services, we consider subway
as main service method, and use subway map from official websites. The
instruction and transportation service descriptions are provided at the
beginning of the session and serve as the knowledge base for the LLMs. The
user’s situation and demands, as well as any relevant information of
disruption, are generated by the user and must include, at a minimum, the
starting location and destination.

We illustrate our method in Figure 1. The proposed system consists of two main
components: an LLM Planner and an LLM Summary. The process begins with a user
query, which includes information such as the start and destination locations,
events and constraints, and additional instructions. This query serves as the
input to the LLM Planner, which generates a detailed plan based on the
provided context.

To enhance the interpretability and usability of the planner’s output, the
system incorporates an LLM Summary component. This module takes the detailed
plan generated by the LLM Planner and creates a concise, standardized summary
that captures the key aspects of the route, mainly the transportation methods
and intermediate stations. By presenting the plan in a structured format, it
is easier for downstream tasks to process the route output.

The reasons for introducing LLM Summary, instead of directly generating
structured plan with LLM Planner, are twofold. The first is that the
performance of generated plan is affected, while the second is that in such
way it is harder to satisfy the given format. We will discuss in more detail
in the following Ablation study section.

###  II-B Prompt Engineering

The performance of LLM Planner and LLM Summary relies on prompt engineering.
For LLM Planner:

  1. 1.

We define the role for LLM Planner to be an alternative path-finding agent who
needs to access its knowledge base(e.g. subway map) every time before
providing recommendations.

  2. 2.

We specify the goal as considering safety first and then efficiency. For
instance, it considers passing through a station marked as dangerous, even
staying on train, as a safety risk to be avoided.

  3. 3.

To further guide the agent’s behavior and decision-making process, we append
additional instructions to the user prompt. These instructions can include
specific preferences, constraints, or contextual information that the agent
should take into account when generating recommendations.

While for LLM Summary, we define the role to be a route summary expert, with
the goal of generating standardized format given a natural language text. We
also give instructions that no other texts should be generated, as the output
is directly used by programming language. Additionally, we observed that LLM
Summary agent tends to ignore some general term describing the transportation
method, for instance, walk. As a result, it failed to include part of the plan
and reach the destination. Therefore, we give examples of acceptable
transportation service terms, which alleviate the phenomenon.

By prompt engineering, we can steer the LLM Planner’s behavior and ensure that
it generates alternative paths that prioritize user safety and efficiency. And
we can also enable LLM Summary to generate required format with no additional
texts, which makes it easier for downstream tasks.

##  III EXPERIMENTS

###  III-A Implementation

For LLM Planner, We compare 3 LLMs: GPT-4, Claude-3 Opus, and Gemini Pro 1.0.

####  III-A1 GPT-4

GPT-4 is a large multimodal model developed by OpenAI, building on the success
of its predecessors in the GPT series. GPT-4 is capable for accepting image
and text inputs and responses in a speed of 100 billion tokens per second.

####  III-A2 Claude 3 Opus

Claude 3 Opus is one of the advanced models in the Claude 3 series developed
by Anthropic. Opus stands out as the most powerful model in the series.

####  III-A3 Gemini Pro

Gemini Pro 1.0 is developed by Google and is publicly available. Gemini Pro
1.0 is able to perform image understanding and reasoning.

By comparison, we aim to identify the most effective model for generating
high-quality navigation plans that meet user needs and preferences. For LLM
Summary, we utilize GPT-4 to generate concise and structured summaries of the
navigation plans produced by the LLM Planner. Our method rely on prompt
engineering and all experiments are conducted without further training or
fine-tune.

###  III-B Description of Scenarios

Table I presents scenarios designed to test the capabilities and limitations
of LLMs in providing route recommendations under various conditions. The
scenarios cover different aspects of transportation systems, such as the type
of subway line (north-south, cross-river, or cross-town), the presence of
extreme weather or emergency events, and the availability of additional
transportation services like buses and Citi Bikes. Each scenario is associated
with a specific take-home message that highlights the key aspect being tested,
for instance, the LLMs’ ability to reason based on general positions, physical
constraints, or the impact of events on regular routes. We also explore the
LLMs’ capacity to incorporate new information provided as images, understand
and utilize markings, and optimize routes based on given constraints.
Furthermore, the inclusion of a scenario involving the DC subway system aims
to investigate whether the LLMs’ performance is specific to NYC due to
potentially richer text data available for the city.

Scenario ID |  Scenario |  Take-home Message |  Input Prompt
---|---|---|---
S1 |  North-south subway, extreme weather |  To test whether LLMs can reason on general positions |  I finished my work at WTC and headed home at Cathedral Parkway. West Manhattan is flooded and 1/2/3/A/B/C/D are not in operation so I want to take alternative paths.
S2 |  Cross-river subway |  To test whether LLMs can reason based on physical constraints |  I’m currently at Cathedral Parkway and heading to Flushing-Main St. What paths should I take based on the NYC subway map? By the way, I want to avoid Times Square.
S3 |  Cross-town subway, emergency events prevent the regular route |  To test whether LLMs can consider the impact of events on regular routes |  I’m currently on 7 local train at Grand Central-42 St. I want to go to Cathedral Parkway. I heard that an attack happens at the intersection of 7 local train and 1/2/3 local trains at Times Square 42 St. How can I go based on NYC subway map?
S4 |  Cross-town subway, emergency events do not prevent the regular route |  To test whether LLMs can reason that the events do not prevent the regular route |  I’m currently on 7 local train at Grand Central-42 St, heading towards Times Square. I want to go to Cathedral Parkway. I heard that an attack happens at the intersection of 7 local train and A/C/E local trains at 42 St. How can I go based on NYC subway map?
S5 |  Attack area, subway |  To test whether LLMs can understand and reason based on the provided images and markings |  The area under the dark rectangular is marked as a dangerous zone and should be avoided. I’m currently at Cathedral Parkway and heading to Flushing-Main St. What paths should I take based on the NYC subway map?
S6 |  Additional transportation services (subway, bus, and Citi Bikes) |  To test whether LLMs can incorporate potentially unfamiliar services given as new image information |  I’m in the black circle area marked as my location, trying to go to 42nd street-port to take bus to Jersey. I would like to use bike for sight viewing in Central Park. However, I heard that it is busy around Times Square, so I want to avoid riding bike there. Bus or subway is preferred. Provided two images are citi bike station locations, with color means the amount of bikes available.
S7 |  Subway and bus |  To test the difference in recommended routes between providing an additional map of bus services or not |  I finished my work at WTC and headed home on Cathedral Parkway. West Manhattan is flooded and 1/2/3/A/B/C/D are not in operation so I want to take alternative paths. Access Manhattan Bus Map to find a path that uses bus services.
S8 |  Constraints |  To test the ability of LLMs to incorporate constraints aimed at optimizing quantitative metrics |  I’m currently at Cathedral Parkway and heading to Flushing-Main St. What paths should I take based on the NYC subway map? By the way, I want to avoid 42nd street the entire Times Square area. With the constraint: Take express if possible(choose route with min stops)
S9 |  DC subway |  To test whether the ability of LLMs is specific to NYC due to potentially richer text data |  I’m currently at Shady Grove, and would like to go to Greenbelt. Area around Gallery Place is dangerous. How can I get there?
TABLE I: Scenario descriptions and take-home messages

###  III-C Metrics

To evaluate the performance of the proposed method, we employ four metrics:
connectivity, avoidance, approximate total travel time and number of
transfers.

  1. 1.

Connectivity: This metric assesses whether the proposed route ensures
available transportation between intermediate stations. A route is considered
to have satisfied connectivity if all the suggested transportation methods are
available at each intermediate station. In this context, ”available” means
that the station is marked as having a train stop, without considering the
specific time table, as this information is not provided to the LLM agents.

  2. 2.

Disruption Avoidance: The avoidance metric evaluates the system’s ability to
generate routes that successfully avoid any areas, stations, or disruptions
the user wishes to avoid based on their preferences or external information.
This could include locations marked as dangerous, stations with reported
incidents, or areas affected by service disruptions. A route is considered to
have failed in avoidance if it passes through or includes any of the user-
specified avoidance criteria, even if the user does not disembark at that
particular station or location.

  3. 3.

Approximate Total Travel Time: To estimate the total travel time for each
proposed route, we use Google Maps to query the travel time for every segment
based on the corresponding transportation method. For routes that fail to
satisfy connectivity, i.e., when the suggested transportation method is not
available between two stations, we estimate the travel time for that segment
by calculating the walking time between the stations. For a fair comparison,
all travel time queries are made with a fixed start time of May 1st, 2024, at
1:30 PM EST, to minimize variations in estimated travel times due to differing
query times. For the purpose of comparison, the travel time for each scenario
is standardized relative to the total estimated walking time from origin to
destination without additional constraints. This is achieved by dividing the
travel time by the walking time, converting the time factor into a percentage
(less than 1). In cases where models fail to yield a valid result, this value
is adjusted to 1.

  4. 4.

Number of Transfers: This metric counts the number of times a user needs to
switch between different trains or transportation methods (e.g., from train to
bus or from bus to walking) along the proposed route. A lower number of
transfers indicates a more convenient route for the user.

##  IV RESULTS

Table II compares the performance of three models - GPT, Gemini, and Claude -
across four key metrics. GPT achieves the highest scores in three out of the
four metrics, with a connectivity score of 0.78, an avoidance score of 0.78,
and the lowest approximate time of 0.51. Gemini, on the other hand, has the
lowest number of transfers at 3.00, but fails for the other three metrics.
Claude falls in between GPT and Gemini. These results suggest that GPT offers
the best overall performance, achieving a good balance between high
connectivity and avoidance scores, low approximate time, and a reasonable
number of transfers.

Metric | GPT | Gemini | Claude
---|---|---|---
Connectivity $\uparrow$ | 0.78 | 0.11 | 0.56
Avoidance $\uparrow$ | 0.78 | 0.22 | 0.67
Approx. Time $\downarrow$ | 0.51 | 0.92 | 0.64
# Transfers $\downarrow$ | 4.00 | 3.00 | 4.20
TABLE II: Performance comparison of GPT, Gemini, and Claude

###  IV-A Ablation Study

We perform the ablation study to investigate the importance of the subway map
image and the LLM summary in the route planning process. As mentioned in [9],
we are interested in determining whether image data is essential for effective
route planning. To explore this, we conduct an ablation study where we keep
all other inputs fixed but remove the map images provided to the agent.
However, for the user query, we still include the image, for instance, image
that marks the dangerous zones, as this information is crucial for
understanding the user’s location, preferences and constraints. By comparing
the performance of the LLMs with and without access to the subway map image,
we can assess the contribution of visual information to the route planning
task. Further, we examine whether a single LLM agent, provided with both
planner and summary instructions, can generate accurate recommendations in the
required format. We evaluate the performance of the generated routes using the
metrics defined in Section III-C. In addition to these metrics, we also count
the number of violations of the route format, as demonstrated in Figure 1.
This allows us to determine the ability of the LLM agent to adhere to the
specified structure.

Table III presents an ablation study comparing the performance of GPT with and
without access to map images. The results demonstrate that providing GPT with
map images leads to significant improvements across all metrics. This
highlights the importance of incorporating visual information in the form of
map images to enhance GPT’s ability to provide accurate and efficient route
recommendations.

Metric | GPT w/ Map | GPT w/o Map
---|---|---
Connectivity $\uparrow$ | 0.78 | 0.67
Avoidance $\uparrow$ | 0.78 | 0.44
Approx. Time $\downarrow$ | 0.51 | 0.59
# Transfers $\downarrow$ | 4.00 | 5.00
TABLE III: Performance comparison of GPT with and without map images

Table IV investigates the impact of using a separate LLM for summarizing the
output. When a separate LLM is employed for summarization, the performance
improves substantially compared to direct summarized output. The separate LLM
summary approach reduces the violations of format to 0.11. On the other hand,
direct summarized output results in lower quality routes, and completely
violates the format.The overall benefits of using a separate LLM for
summarization, particularly in terms of route quality and format adherence,
make it a more effective strategy.

The only instance where the separate LLM summary approach leads to a violation
of format is Scenario S4. In this case, the LLM Planner correctly suggests
taking the 1 train from Times Square to the destination, effectively avoiding
the dangerous area. However, the separate LLM summary identifies this as a
contradiction to the narrative’s emphasis on avoiding Times Square. As a
result, it proposes an alternative route with additional reasoning, despite
the LLM Planner’s already safe and efficient recommendation. This highlights a
potential limitation of using a separate LLM for summarization, as it may
occasionally overrule valid suggestions due to a misinterpretation of the
context. Nonetheless, the benefits of the separate LLM summary approach, as
demonstrated by the overall improvements in route quality and format
adherence, generally outweigh this inconsistency.

Metric | Separate LLM Summary?
---|---
| Yes | No
Connectivity $\uparrow$ | 0.78 | 0.44
Avoidance $\uparrow$ | 0.78 | 0.22
Approx. Time $\downarrow$ | 0.51 | 0.65
# Transfers $\downarrow$ | 4.00 | 2.80
Violations of format $\downarrow$ | 0.11 | 1.00
TABLE IV: Performance comparison of direct summarized output and summarized
with another agent

##  V DISCUSSION

Figure 2: Image input of Scenario S5. The area under the dark rectangular is
marked as a dangerous zone and should be avoided

Figure 3: Image input of Scenario S6. The black circle is user’s location. The
bubbles are citi bike stations with the amount of bikes available Figure 4: A
demonstration of routes generated for Scenario S2

The ability to process image data requires further analysis. Figure 2
illustrates the constraints for Scenario S5, where the black-boxed area on the
map indicates the region the route should avoid while still identifying a
valid path to the destination. The results for this scenario were
unsatisfactory; although GPT-4 was the only model that successfully avoided
the black-boxed area, it failed to maintain a connected route to the
destination. The previous section (IV-A) has demonstrated that utilizing maps
significantly enhances the quality of the outputs. Nevertheless, marking an
area on the map did not yield success in Scenario S5. The potential reasons
for this failure might be the insufficient resolution of the image or the
possibility that all the most commonly used routes fall within the black-boxed
area, preventing the agents from identifying a valid route that adheres to the
constraints.

Figure 3 presents the image input for Scenario S6, where the current location
is marked by a black circle, and nearby Citi Bike stations are labeled on the
map. The agents were tasked with planning a bicycle route that includes
sightseeing in Central Park and concludes at the Port Authority Bus Terminal
using public transportation while avoiding biking through Times Square. In
this scenario, Claude 3 emerged as the best-performing model. It not only
provided a route that satisfied all restrictions but also demonstrated an
understanding of Citi Bike usage. For instance, Claude 3 Opus was the only
model to mention renting and returning the bike and interpreting the
availability information in the image, with raw output like ”Walk to the
nearby Citi Bike station at Cathedral Parkway & Broadway (just south of your
location). The map shows this station has a good number of bikes available.”
and ”exit the park and return your bike to a station near W 57th St, such as
8th Ave & W 57th St or Broadway & W 58th St.” Conversely, other models failed
to identify specific bike stations. Scenario S6, which involves potentially
unfamiliar transportation services compared to other scenarios, highlights the
limitations of the other models.

While our experiments required the LLM Planner to generate routes with
specific trains, tools like Google Directions only require the transportation
mode, such as transit, and internally determine the specific trains.
Consequently, identifying the proper intermediate stations is more crucial
than specifying the exact trains, when used with such navigation tools.

Figure 4 demonstrates the routes generated for Scenario S2, where the
requirement is to avoid Times Square. From left to right, the red, pink, and
blue lines represent the routes generated by GPT-4, Claude 3, and Gemini,
respectively. Although all three models successfully avoid Times Square, only
the route generated by GPT-4 satisfies the connectivity criterion (defined in
Section III-C). Both Claude 3 and Gemini generate routes that suggest taking a
train to an unreachable station. However, this issue is mitigated when using
Google Directions, as it will automatically specify the correct train to reach
the desired station.

##  VI CONCLUSION

In this paper, we proposed a prototype system TraveLLM for customized route
planning in face of network disruptions. We designed a set of test cases to
evaluate the performance of state-of-the-art LLMs in generating accurate
routes. Our comparative analysis demonstrated the effectiveness of LLMs,
particularly GPT-4, in generating high-quality navigation plans. The ablation
study showed the importance of incorporating visual information, such as
subway map images, to enhance the LLMs’ ability to reason about the
transportation network and provide more accurate routes. Furthermore, we
showed that employing a separate LLM for summarizing the output leads to
improved route quality and adherence to the desired format, compared to direct
summarized output. We also identified limitations and areas for future
improvement. The ability of LLMs to process image data and incorporate
potentially unfamiliar transportation services requires further improvements.
Overall, our findings underscore the potential of LLMs in enhancing existing
navigation systems and providing a more flexible method for addressing diverse
user needs in face of disruptions. Our future work would focus on improving
the agents’ ability to process visual information, mitigate hallucination, and
refine the interaction between the LLM agents and downstream applications.

## References

  * [1] J. Achiam, S. Adler, S. Agarwal, L. Ahmad, I. Akkaya, F. L. Aleman, D. Almeida, J. Altenschmidt, S. Altman, S. Anadkat _et al._ , “Gpt-4 technical report,” OpenAI, Tech. Rep., 2023.
  * [2] Anthropic, “Introducing the claude 3 family,” https://www.anthropic.com/news/claude-3-family, 2024.
  * [3] G. Team, R. Anil, S. Borgeaud, Y. Wu, J.-B. Alayrac, J. Yu, R. Soricut, J. Schalkwyk, A. M. Dai, A. Hauth _et al._ , “Gemini: a family of highly capable multimodal models,” _arXiv preprint arXiv:2312.11805_ , 2023.
  * [4] M. U. Hadi, R. Qureshi, A. Shah, M. Irfan, A. Zafar, M. B. Shaikh, N. Akhtar, J. Wu, S. Mirjalili _et al._ , “A survey on large language models: Applications, challenges, limitations, and practical usage,” _Authorea Preprints_ , 2023.
  * [5] W. X. Zhao, K. Zhou, J. Li, T. Tang, X. Wang, Y. Hou, Y. Min, B. Zhang, J. Zhang, Z. Dong _et al._ , “A survey of large language models,” _arXiv preprint arXiv:2303.18223_ , 2023.
  * [6] L. Wang, C. Ma, X. Feng, Z. Zhang, H. Yang, J. Zhang, Z. Chen, J. Tang, X. Chen, Y. Lin _et al._ , “A survey on large language model based autonomous agents,” _Frontiers of Computer Science_ , vol. 18, no. 6, pp. 1–26, 2024.
  * [7] X. Zhou, M. Liu, B. L. Zagar, E. Yurtsever, and A. C. Knoll, “Vision language models in autonomous driving and intelligent transportation systems,” _arXiv preprint arXiv:2310.14414_ , 2023.
  * [8] B. Li, Y. Wang, J. Mao, B. Ivanovic, S. Veer, K. Leung, and M. Pavone, “Driving everywhere with large language model policy adaptation,” _arXiv preprint arXiv:2402.05932_ , 2024.
  * [9] L. Chen, J. Li, X. Dong, P. Zhang, Y. Zang, Z. Chen, H. Duan, J. Wang, Y. Qiao, D. Lin _et al._ , “Are we on the right way for evaluating large vision-language models?” _arXiv preprint arXiv:2403.20330_ , 2024.


#  On discrete analogues of potential vorticity for
variational shallow water systems

Elizabeth L. Mansfield
School of Mathematics, Statistics and Actuarial Science,
University of Kent, Canterbury, CT2 7FS, UK

(March 7, 2016)

###### Abstract

We outline how discrete analogues of the conservation of potential vorticity
may be achieved in Finite Element numerical schemes for a variational system
which has the particle relabelling symmetry, typically shallow water
equations.

We show that the discrete analogue of the conservation law for potential
vorticity converges to the smooth law for potential vorticity, and moreover,
for a strong solution, is the weak version of the potential vorticity law.
This result rests on recent results by the author with T. Pryer concerning
discrete analogues of conservation laws in Finite Element variational
problems, together with an observation by P. Hydon concerning how the
conservation of potential vorticity in smooth systems arises as a consequence
of the linear momenta.

The purpose of this paper is to provide all the necessary information for the
implementation of the schemes and the necessary numerical tests. A brief
tutorial on Noether’s theorem is included to demonstrate the origin of the
laws and to demonstrate that the numerical method follows the same basic
principle, which is that the law follows directly from the Lie group
invariance of the Lagrangian.

##  1 Introduction

The UK Met office famously failed to predict a hurricane in 1987. The author
was told that111The author is grateful to Ian Roulstone, formerly of the Met
Office, for relating the story to her., in retrospect, this was felt to be the
failure of the numerical code to preserve the physically important quantity,
potential vorticity (as well as incomplete data).

More recently, in 2012, a post-tropical cyclone hit the United States, near
Brigantine, New Jersey. Several early forecasts of this cyclone stated that
the weather system would disappear over the Atlantic Ocean. However,
researchers at the European Center for Medium-Range Weather Forecasts (ECMWF)
had a different opinion: they possessed a model which predicted the landfall
of the storm around New Jersey. Their successful forecast derived from the
fact that their model depicted accurately the evolution of potential vorticity
[10]. Thus, potential vorticity plays an important role in weather
forecasting, and for this reason, it is interesting to investigate its
inclusion in a numerical model.

Potential vorticity arises as a Noether conservation law under the “particle
relabelling" symmetry, that is, invariance of the Lagrangian under area222For
a system with two space dimensions, such as those for shallow water.
preserving diffeomorphisms in the independent variables. The preservation of
potential vorticity in a numerical scheme is desired but thought to be an
impossible goal.

In recent work with T. Pryer, it was shown that if the numerical variational
method, specifically a Finite Element method, has the same set of Lie group
symmetries, then there will be what we call here Noether identities, which are
the analogues of the identities yielding Noether’s conservation laws in the
regular case [6]. Further, the Noether identities hold for any mesh, even when
the Lie group action is on the base space.

We begin by discussing Noether’s conservation laws and the conservation of
potential vorticity in smooth (regular) variational systems. The aim is to
provide essentially a tutorial in how Noether’s identity is calculated, from
the infinitesimal criterion of invariance, in simple examples for readers
unfamiliar with the, by now, extensive literature.

We then review the results that derive by applying this criterion to two
families of variational numerical schemes.

Specifically, we show first that the Finite Element Noether identity
corresponding to invariance under the particle relabelling symmetry, does
indeed converge to the regular law giving the conservation of potential
vorticity, at the same time as having discrete analogues of energy and linear
and angular momenta. We then construct a finite difference type scheme which
also demonstrates finite difference analogues of these laws.

##  2 Noether’s laws for smooth variational systems

A Lie group is a group which is also a manifold, a topological space with an
atlas of smooth Euclidean coordinate charts. In practice, this means the group
elements depend smoothly on real parameters. The two simplest examples
occurring in physical and engineering problems are:

  1. 1.

the real numbers under addition, $(\mathbb{R},+)$, acting on a variable $x$ by
either translation, $x\mapsto x+\epsilon$, or scaling,
$x\mapsto\exp(\lambda)x$

  2. 2.

the special orthogonal group, $SO(n)$, acting on a point
$\mathbf{v}\in\mathbb{R}^{n}$ linearly, as $\mathbf{v}\mapsto g\mathbf{v}$,
that is, as a rotation.

Any action on variables induces an action on functions of those variables,
$g\cdot F(x)=F(g\cdot x)$. The induced action on derivatives is obtained via
the chain rule,

$g\cdot\frac{\partial u}{\partial x}:=\frac{\partial\left(g\cdot
u\right)}{\partial\left(g\cdot x\right)}=\frac{\displaystyle\frac{\partial
g\cdot u}{\partial x}}{\displaystyle\frac{\partial g\cdot x}{\partial x}},$

where the second equality follows from implicit differentiation in the case
here of a single independent variable. Further, the induced action on
integrands of line, surface and volume forms, is also induced by the chain
rule, for example,

$g\cdot{\rm d}x={\rm d}\left(g\cdot x\right)=\frac{\partial\left(g\cdot
x\right)}{\partial x}\,{\rm d}x.$

###### Example 2.1

Consider the action of $SE(2)=S)(2)\ltimes\mathbb{R}^{2}$, given by rotation
and translation in the plane. If we take a curve in the plane to be
$(x,u(x))$, then we have

$g\cdot(x,u(x))=\left(g\cdot x,g\cdot
u\right)=\left(\cos(\theta)\,x-\sin(\theta)\,u(x)+a,\sin(\theta)\,x+\cos(\theta)\,u(x)+b\right)$

The induced action on $u_{x}$ is

$g\cdot u_{x}=\frac{{\rm d}(g\cdot u)}{{\rm d}(g\cdot x)}=\frac{{\rm d}(g\cdot
u)}{{\rm d}x}\Big{/}\frac{{\rm d}(g\cdot x)}{{\rm
d}x}=\frac{\sin(\theta)+\cos(\theta)u_{x}}{\cos(\theta)-\sin(\theta)u_{x}},$

while that on $u_{xx}$ is

$g\cdot u_{xx}=\frac{{\rm d}(g\cdot u_{x})}{{\rm d}x}\Big{/}\frac{{\rm
d}(g\cdot x)}{{\rm
d}x}=\frac{u_{xx}}{\left(\cos(\theta)-\sin(\theta)\,u_{x}\right)^{3}}.$

The induced action on the integrand, $f(x,u(x))\,{\rm d}x$ is given by

$\begin{array}[]{rcl}g\cdot\left(F(x,u(x))\,{\rm d}x\right)&=&F(g\cdot
x,g\cdot u)\,{\rm d}(g\cdot x)\\\ &=&F(g\cdot x,g\cdot
u)\,\left(\cos(\theta)-\sin(\theta)\,u_{x}\right){\rm d}x.\end{array}$

We are interested in the induced action on a Lagrangian, which for a one
dimensional problem, takes the form,

$g\cdot\int_{\Omega}L(x,u,u_{x})\,{\rm d}x:=\int_{g\cdot\Omega}L\left(g\cdot
x,g\cdot u,g\cdot u_{x}\right)\,{\rm d}\left(g\cdot
x\right)=\int_{\Omega}L\left(g\cdot x,g\cdot u,g\cdot
u_{x}\right)\frac{\partial g\cdot x}{\partial x}\,{\rm d}x$ (1)

where the second equality follows by considering all quantities with respect
to the original independent variable This is the same as transforming back to
the original variables on the base space ([7], page 249) via the group action
map on the base space. It is important to note that as $g\cdot x$ is a
function of $(x,u(x),g)$, then the third integrand is indeed defined on the
original domain $\Omega$.

If $g\cdot\int L\,{\rm d}x=\int L\,{\rm d}x$ for all $g\in G$, then we may
take a path $\epsilon\mapsto\gamma(\epsilon)\subset G$ though the identity of
the group, so that $\gamma(0)=e$, the identity of $G$, and we will have

$\frac{{\rm d}}{{\rm d}\epsilon}\Big{|}_{\epsilon=0}\gamma(\epsilon)\cdot\int
L\,{\rm d}x=0.$ (2)

The result is the so-called Infinitesimal Criterion of Invariance. As we show
below, Noether’s Theorem is the straightforward result of this criterion for
an invariant Lagrangian.

###### Example 2.2

Continuing with Example 2.1, we have $g=g(\theta,a,b)$, and $g(0,0,0)=e$, the
identity map. By the formulae for the group action, we obtain the so-called
infinitesimals

$\frac{{\rm d}}{{\rm d}a}\Big{|}_{a=0}g\cdot x=1,\qquad\frac{{\rm d}}{{\rm
d}a}\Big{|}_{a=0}g\cdot u=0,\qquad\frac{{\rm d}}{{\rm d}a}\Big{|}_{a=0}g\cdot
u_{x}=0,\qquad\frac{{\rm d}}{{\rm d}a}\Big{|}_{a=0}g\cdot u_{xx}=0$

and similarly for $b$ and $\theta$. We collect the infinitesimals into a
table, where for variable $v$ and parameter $a_{i}$ the $(a_{i},v)$ entry is
${\rm d}v/{\rm d}a_{i}|_{e}$.

$\begin{array}[]{|c|ccccc|}\hline\cr&x&u&u_{x}&u_{xx}&{\rm d}x\\\ \hline\cr
a&1&0&0&0&0\\\ b&0&1&0&0&0\\\
\theta&-u&x&1+u_{x}^{2}&-3u_{x}u_{xx}&-u_{x}\,{\rm d}x\\\
\hline\cr\end{array}$

We then have,

$\frac{{\rm d}}{{\rm d}\theta}\Big{|}_{\theta=0}F\left(g\cdot x,g\cdot
u\right)=-\frac{\partial F}{\partial x}u+\frac{\partial F}{\partial u}x$

and

$\frac{{\rm d}}{{\rm d}\theta}\Big{|}_{\theta=0}F\left(g\cdot x,g\cdot
u\right)\,{\rm d}(g\cdot x)=\left(-\frac{\partial F}{\partial
x}u+\frac{\partial F}{\partial u}x-F(x,u)u_{x}\right)\,{\rm d}x.$

If we have a second order Lagrangian which is invariant under this action, so
that, $L\left(g\cdot x,g\cdot u,g\cdot u_{x},g\cdot u_{xx}\right)\,{\rm
d}(g\cdot x)=L(x,u,u_{x},u_{xx})\,{\rm d}x$ for all $g$, then there are three
identities that $L$ satisfies,

$\begin{array}[]{crcl}a:&\displaystyle\frac{\partial L}{\partial
x}&=&0\\\\[7.5pt] b:&\displaystyle\frac{\partial L}{\partial u}&=&0\\\\[7.5pt]
\theta:&\displaystyle-u\frac{\partial L}{\partial x}+x\frac{\partial
L}{\partial u}+(1+u_{x}^{2})\frac{\partial L}{\partial
u_{x}}-3u_{x}u_{xx}\frac{\partial L}{\partial u_{xx}}-u_{x}L&=&0\end{array}$

We now turn to the statement of Noether’s Theorem. Noether’s theorem is, in
fact, “nothing but" a rearrangement of the infinitesimal criterion of
invariance. We show only the simplest low order cases, and then those that
pertain to our systems of interest. The text by Olver, gives a comprehensive
description and proof of recurrence formulae for the infinitesimals, and the
proof of the Noether’s Theorem, in the general case. We record here the result
for some simple examples.

Consider the simplest, lowest order, lowest dimension, Lagrangian,
$L(x,u,u_{x})\,{\rm d}x$, and suppose this Lagrangian is invariant under a Lie
group action with parameter $\epsilon$. If the infinitesimals are

$\frac{{\rm d}}{{\rm d}\epsilon}\Big{|}_{\epsilon=0}g(\epsilon)\cdot
x=\xi(x,u),\qquad\frac{{\rm d}}{{\rm
d}\epsilon}\Big{|}_{\epsilon=0}g(\epsilon)\cdot u=\phi(x,u)$ (3)

then the infinitesimal criterion for invariance yields,

$\frac{\partial L}{\partial x}\xi(x,u)+\frac{\partial L}{\partial
u}\phi(x,u)+\frac{\partial L}{\partial u_{x}}\left(\frac{{\rm d}\phi}{{\rm
d}x}-u_{x}\frac{{\rm d}\xi}{{\rm d}x}\right)+L\frac{{\rm d}\xi}{{\rm d}x}=0.$
(4)

Adding and subtracting the terms needed to convert $\partial L/\partial x$
into ${\rm d}L/{\rm d}x$ in the Infinitesimal Criterion of Invariance,
Equation (4) and rearranging, we obtain

$\left(\phi-u_{x}\xi\right)E(L)+\frac{{\rm d}}{{\rm
d}x}\left(L\xi+\frac{\partial L}{\partial u_{x}}\left(\phi-
u_{x}\xi\right)\right)=0$ (5)

where

$E(L)=\frac{\partial L}{\partial u}-\frac{{\rm d}}{{\rm d}x}\frac{\partial
L}{\partial u_{x}}$

is the Euler Lagrange equation. Therefore, on solutions of $E(L)=0$, we will
have

$\frac{{\rm d}}{{\rm d}x}\left(L\xi+\frac{\partial L}{\partial
u_{x}}\left(\phi-u_{x}\xi\right)\right)=0$

which is Noether’s conservation law for this case.

###### Example 2.3

For a second order, one dimensional Lagrangian, $L(x,u,u_{x},u_{xx})\,{\rm
d}x$, which is invariant under a Lie group action with infinitesimals $\xi$,
$\phi$, Noether’s Theorem is, setting $Q=\phi-u_{x}\xi$,

$E(L)Q+\frac{{\rm d}}{{\rm d}x}\left(L\xi+\frac{\partial L}{\partial
u_{x}}Q+\frac{\partial L}{\partial u_{xx}}\frac{{\rm d}}{{\rm
d}x}Q-Q\frac{{\rm d}}{{\rm d}x}\frac{\partial L}{\partial u_{xx}}\right)=0,$
(6)

where

$E(L)=\frac{\partial L}{\partial u}-\frac{{\rm d}}{{\rm d}x}\frac{\partial
L}{\partial u_{x}}+\frac{{\rm d}^{2}}{{\rm d}x^{2}}\frac{\partial L}{\partial
u_{xx}}$

is the Euler Lagrange equation for this case. Equation (6) is easily seen to
be a rearrangement of the infinitesimal criterion of invariance, which is

$\frac{\partial L}{\partial x}\xi+\frac{\partial L}{\partial
u}\phi+\frac{\partial L}{\partial u_{x}}\phi_{[x]}+\frac{\partial L}{\partial
u_{xx}}\phi_{[xx]}+L\frac{{\rm d}}{{\rm d}x}\xi=0$

where

$\begin{array}[]{rclcl}\phi_{[x]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{u_{x}}&=&\displaystyle\frac{{\rm
d}\phi}{{\rm d}x}-u_{x}\frac{{\rm d}\xi}{{\rm d}x}\\\\[7.5pt]
\phi_{[xx]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{u_{xx}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}x}\left(\frac{{\rm d}\phi}{{\rm d}x}-u_{x}\frac{{\rm d}\xi}{{\rm
d}x}\right)-u_{xx}\frac{{\rm d}\xi}{{\rm d}x}\end{array}$

###### Remark 2.1 Names of the conserved quantities

If the independent variables are $(t,x_{1},x_{2},\dots,x_{p})$ where $t$ is
time, and $u^{\alpha}$, $\alpha=1,\dots,q$ are the dependent variables, then
Noether’s law is of the form

$\sum_{\alpha}Q^{\alpha}E^{\alpha}(L)+\frac{{\rm d}}{{\rm
d}t}A_{0}+\sum_{i}\frac{{\rm d}}{{\rm d}x_{i}}A_{i}=0,$

where $E^{\alpha}(L)$ is the Euler Lagrange equation with respect to the
dependent variable $u^{\alpha}$ and $Q^{\alpha}$ is the characteristic of the
group action with respect to $u^{\alpha}$. If $\Omega\subset\mathbb{R}^{p}$ is
the spatial domain for the Lagrangian, we have on solutions of the Euler
Lagrnage equations,

$0=\int_{\Omega}\left(\frac{{\rm d}}{{\rm d}t}A_{0}+\sum_{i}\frac{{\rm
d}}{{\rm d}x_{i}}A_{i}\right)=\frac{{\rm d}}{{\rm
d}t}\int_{\Omega}A_{0}+\int_{\partial\Omega}\mathbf{A}\cdot\mathbf{n}$

by Stokes’ Theorem. The scalar $A_{0}$ is said to be conserved density while
the vector $(A_{1},\dots,A_{p})$ is called the flux. If the Lie group action
is translation in time, the scalar $A_{0}$ is said to be the energy of the
system described by the Euler Lagrange equations. The table following gives
the common names for the conservation laws for the given symmetries.

Symmetry | $A_{0}$
---|---
Translation in time | Energy
Translation in space | Linear momentum
Rotation in space | Angular momentum
Particle relabelling | Potential vorticity

###  2.1 Shallow water Lagrangians

We are concerned with Lagrangians for shallow water systems. The general form
of the infinitesimal criterion of invariance and Noether’s laws for such
systems are detailed in the next example.

###### Example 2.4

[Lagrangians of shallow water type - general form] We consider the case in
which there are two spatial and one time variables, which we will denote as
$(a,b,t)$ and which will be the particle labels and time. We assume two
dependent variables, which we will denote $(x,y)$ and which will be the
position of the fluid particle at time $t$, so that
$(x(a,b,0),y(a,b,0))=(a,b)$ and we will assume a first order Lagrangian, that
is,

$L(a,b,t,x_{a},x_{b},x_{t},y_{a},y_{b},y_{t})\,{\rm d}a\,{\rm d}b\,{\rm d}t.$
(7)

We take the infinitesimals to be

$\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{a}=\xi,\quad\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{b}=\tau,\quad\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{t}=\chi,\quad\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{x}=\phi^{x},\quad\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{y}=\phi^{y}.$ (8)

Then the infinitesimal criterion of invariance is

$0=\frac{\partial L}{\partial a}\xi+\frac{\partial L}{\partial
b}\tau+\frac{\partial L}{\partial t}\chi+\frac{\partial L}{\partial
x}\phi^{x}+\frac{\partial L}{\partial y}\phi^{y}+\frac{\partial L}{\partial
x_{a}}\phi^{x}_{[a]}+\frac{\partial L}{\partial
x_{b}}\phi^{x}_{[b]}+\frac{\partial L}{\partial
x_{t}}\phi^{x}_{[t]}+\frac{\partial L}{\partial
y_{a}}\phi^{y}_{[a]}+\frac{\partial L}{\partial
y_{b}}\phi^{y}_{[b]}+\frac{\partial L}{\partial y_{t}}\phi^{y}_{[t]}$

where

$\begin{array}[]{rclcl}\phi^{x}_{[a]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{x_{a}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}a}\phi^{x}-x_{a}\frac{{\rm d}}{{\rm d}a}\xi-x_{b}\frac{{\rm
d}}{{\rm d}a}\tau-x_{t}\frac{{\rm d}}{{\rm d}a}\chi\\\\[7.5pt]
\phi^{x}_{[b]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{x_{b}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}b}\phi^{x}-x_{a}\frac{{\rm d}}{{\rm d}b}\xi-x_{b}\frac{{\rm
d}}{{\rm d}b}\tau-x_{t}\frac{{\rm d}}{{\rm d}b}\chi\\\\[7.5pt]
\phi^{x}_{[t]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{x_{t}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}t}\phi^{x}-x_{a}\frac{{\rm d}}{{\rm d}t}\xi-x_{b}\frac{{\rm
d}}{{\rm d}t}\tau-x_{t}\frac{{\rm d}}{{\rm d}t}\chi\\\\[7.5pt]
\phi^{y}_{[a]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{y_{a}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}a}\phi^{y}-y_{a}\frac{{\rm d}}{{\rm d}a}\xi-y_{b}\frac{{\rm
d}}{{\rm d}a}\tau-y_{t}\frac{{\rm d}}{{\rm d}a}\chi\\\\[7.5pt]
\phi^{y}_{[b]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{y_{b}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}b}\phi^{y}-y_{a}\frac{{\rm d}}{{\rm d}b}\xi-y_{b}\frac{{\rm
d}}{{\rm d}b}\tau-y_{t}\frac{{\rm d}}{{\rm d}b}\chi\\\\[7.5pt]
\phi^{y}_{[t]}&=&\displaystyle\frac{{\rm d}}{{\rm
d}\epsilon}\big{|}_{\epsilon=0}\widetilde{y_{t}}&=&\displaystyle\frac{{\rm
d}}{{\rm d}t}\phi^{y}-y_{a}\frac{{\rm d}}{{\rm d}t}\xi-y_{b}\frac{{\rm
d}}{{\rm d}t}\tau-y_{t}\frac{{\rm d}}{{\rm d}t}\chi\end{array}$

The infinitesimal criterion is then rearranged to yield Noether’s identity for
this case, which is

$\displaystyle E^{x}(L)Q^{x}$
$\displaystyle+E^{y}(L)Q^{y}+\displaystyle\frac{{\rm d}}{{\rm
d}a}\left(L\xi+\frac{\partial L}{\partial x_{a}}Q^{x}+\frac{\partial
L}{\partial y_{a}}Q^{y}\right)$ $\displaystyle+\frac{{\rm d}}{{\rm
d}b}\left(L\tau+\frac{\partial L}{\partial x_{b}}Q^{x}+\frac{\partial
L}{\partial y_{b}}Q^{y}\right)+\frac{{\rm d}}{{\rm
d}t}\left(L\chi+\frac{\partial L}{\partial x_{t}}Q^{x}+\frac{\partial
L}{\partial y_{t}}Q^{y}\right)=0$ (9)

where $Q^{x}=\phi^{x}-x_{a}\xi-x_{b}\tau-x_{t}\chi$, $Q^{y}=\phi^{y}-y_{a}\xi-
y_{b}\tau-y_{t}\chi$ and where the Euler Lagrange equations are

$\begin{array}[]{rcl}E^{x}(L)&=&\displaystyle\displaystyle\frac{\partial
L}{\partial x}-\frac{{\rm d}}{{\rm d}a}\frac{\partial L}{\partial
x_{a}}-\frac{{\rm d}}{{\rm d}b}\frac{\partial L}{\partial x_{b}}-\frac{{\rm
d}}{{\rm d}t}\frac{\partial L}{\partial x_{t}}\\\\[12.0pt]
E^{y}(L)&=&\displaystyle\displaystyle\frac{\partial L}{\partial y}-\frac{{\rm
d}}{{\rm d}a}\frac{\partial L}{\partial y_{a}}-\frac{{\rm d}}{{\rm
d}b}\frac{\partial L}{\partial y_{b}}-\frac{{\rm d}}{{\rm d}t}\frac{\partial
L}{\partial y_{t}}.\end{array}$

We next look at the particle relabelling symmetry and the conservation of
potential vorticity for shallow water Lagrangians.

####  2.1.1 The particle relabelling symmetry and the conservation of
potential vorticity

We consider again the problem of Example 2.4, with independent variables
$(a,b,t)$ where $t$ is time and $(a,b)$ are the particle labels at time $t=0$.
The dependent variables $(x,y)$ are the position of the particle at time $t$.
The particle relabelling symmetry group is given by the set of area preserving
diffeomorphisms,

$\widetilde{a}=A(a,b),\qquad\widetilde{b}=B(a,b),\qquad
A_{a}B_{b}-A_{b}B_{a}=1.$

Further, $\widetilde{t}=t$, $\widetilde{x}=x$ and $\widetilde{y}=y$, that is,
$x$, $y$ and $t$ are invariant under the action. A first order Lagrangian
which is invariant under this symmetry action takes the form

$L(x,y,\Delta,x_{t},y_{t})\,{\rm d}a\,{\rm d}b\,{\rm
d}t,\qquad\Delta=x_{a}y_{b}-x_{b}y_{a}.$ (10)

A higher order Lagrangian with this symmetry will have additional arguments of
the form of invariant derivatives of the generating invariant $\Delta$,

$\frac{\partial^{m+n}}{\partial x^{m}\partial
y^{n}}\Delta,\qquad\frac{\partial}{\partial
x}=\frac{1}{\Delta}\left(y_{b}\frac{\partial}{\partial
a}-y_{a}\frac{\partial}{\partial b}\right),\quad\frac{\partial}{\partial
y}=\frac{1}{\Delta}\left(-x_{b}\frac{\partial}{\partial
a}+x_{a}\frac{\partial}{\partial b}\right)$ (11)

as well as derivatives with respect to $t$. It should noted that
$\displaystyle\left[\frac{\partial}{\partial t},\frac{\partial}{\partial
x}\right]$ and $\displaystyle\left[\frac{\partial}{\partial
t},\frac{\partial}{\partial y}\right]$ are not zero, as $x$ and $y$ depend on
time $t$.

The formula for the potential vorticity of the smooth problem is obtained by
cross-differentiation of the formulae for the linear momenta, an observation
by Peter Hydon, [4]. The Noether identities for the smooth linear momenta of a
first order Lagrangian, are given by

$\begin{array}[]{rcl}x_{a}E^{x}+y_{a}E^{y}&=&\displaystyle\frac{{\rm d}}{{\rm
d}a}\left(L+\Delta\frac{\partial L}{\partial\Delta}\right)+\frac{{\rm d}}{{\rm
d}t}\left(x_{a}\frac{\partial L}{\partial x_{t}}+y_{a}\frac{\partial
L}{\partial y_{t}}\right)\\\\[7.5pt]
x_{b}E^{x}+y_{b}E^{y}&=&\displaystyle\frac{{\rm d}}{{\rm
d}b}\left(L+\Delta\frac{\partial L}{\partial\Delta}\right)+\frac{{\rm d}}{{\rm
d}t}\left(x_{b}\frac{\partial L}{\partial x_{t}}+y_{b}\frac{\partial
L}{\partial y_{t}}\right).\end{array}$

Cross differentiation of these, on solution of the Euler Lagrange equations,
yields the conservation of potential vorticity, given explicitly as

$\frac{{\rm d}}{{\rm d}t}\left(\frac{{\rm d}}{{\rm
d}b}\left(x_{a}\frac{\partial L}{\partial x_{t}}+y_{a}\frac{\partial
L}{\partial y_{t}}\right)-\frac{{\rm d}}{{\rm d}a}\left(x_{b}\frac{\partial
L}{\partial x_{t}}+y_{b}\frac{\partial L}{\partial y_{t}}\right)\right)=0,$
(12)

which can be simplified to

$\frac{{\rm d}}{{\rm d}t}\left(\frac{\partial}{\partial y}\frac{\partial
L}{\partial x_{t}}-\frac{\partial}{\partial x}\frac{\partial L}{\partial
y_{t}}\right)=0$ (13)

using the definitions of the operators in Equation (11). The exactly conserved
density in Equation (13) is known as potential vorticity $\Psi$,

$\Psi=\frac{\partial}{\partial y}\frac{\partial L}{\partial
x_{t}}-\frac{\partial}{\partial x}\frac{\partial L}{\partial y_{t}}$

We next write down two well known shallow water Lagrangians and calculate
their potential vorticities.

###  2.2 Examples

We give here two examples, quoted from [3].

In the two-dimensional shallow water theory [13] a typical particle (more
precisely, fluid column) has the Cartesian horizontal coordinates

$x=x(a,b,t),\qquad y=y(a,b,t),$ (14)

expressed as functions of the particle labels $(a,b)\in\mathbb{R}^{2}$ and
time $t\in\mathbb{R}^{+}$. For convenience, each particle is labelled by its
position at a reference time $t=0$, this means the functions in (14) are
defined such that $x(a,b,0)=a$ and $y(a,b,0)=b$. The incompressibility
hypothesis requires

${\frac{h(a,b,0)}{h(a,b,t)}}={\frac{\partial(x,y)}{\partial(a,b)}},$ (15)

where the Jacobian on the right is that of the mapping (14). The time
derivative of (15) following the particle gives the continuity equation. In
this paper we assume $h(a,b,0)=1$, so that the incompressibility hypothesis
becomes

$h(a,b,t)=\frac{1}{x_{a}y_{b}-x_{b}y_{a}},$ (16)

where subscripts denote partial derivatives. The mapping (14) is assumed to be
invertible, such that when $a=a(x,y,t)$ and $b=b(x,y,t)$ are inserted into
(15), then the current depth $h$ is expressed as function of $x$, $y$ and $t$,
which represents the Eulerian description.

Example 1: the potential form of the SW equations

The equations of the horizontal momentum balance for the flows over a bed
which is rotating with position dependent Coriolis parameter $f=f(y)$ are

$\displaystyle\ddot{x}+gh_{x}-f\dot{y}$ $\displaystyle=0,$ (17a)
$\displaystyle\ddot{y}+gh_{y}+f\dot{x}$ $\displaystyle=0,$ (17b)

where $g$ is a nonzero constant (representing the combined effect of the
acceleration due to gravity and a centrifugal component due to the Earth’s
rotation), dot denotes the time derivative following a particle, and $h_{x}$
and $h_{y}$ are given by

$\displaystyle h_{x}$ $\displaystyle=h(y_{b}h_{a}-y_{a}h_{b}),$ (18a)
$\displaystyle h_{y}$ $\displaystyle=h(x_{a}h_{b}-x_{b}h_{a}).$ (18b)

Henceforth we shall assume that $f$ is a constant. It is known that the
shallow water potential vorticity defined by

$\Omega={\frac{1}{h}}\left(\frac{\partial\dot{y}}{\partial
x}-\frac{\partial\dot{x}}{\partial y}+f\right),$ (19)

is conserved on particles (see [2, 8] and the references therein).

If we let $u=\dot{x}$ and $v=\dot{y}$, then the SW equations (17) can be
written as

$\displaystyle\dot{x}$ $\displaystyle=u,$ (20a) $\displaystyle\dot{y}$
$\displaystyle=v,$ (20b) $\displaystyle\dot{u}$
$\displaystyle+gh(y_{b}h_{a}-y_{a}h_{b})-fv=0,$ (20c) $\displaystyle\dot{v}$
$\displaystyle+gh(x_{a}h_{b}-x_{b}h_{a})+fu=0,$ (20d)

where $h$ is given by (16), which we shall refer to as the potential form of
the SW equations (17).

Salmon [14] showed that there is a first-order Lagrangian

$\mathcal{L}=(u-R)\dot{x}+(v+P)\dot{y}-\tfrac{1}{2}\left(u^{2}+v^{2}+gh\right),$
(21)

where the functions $P=P(x,y)$ and $R=R(x,y)$ satisfy

$P_{x}+R_{y}=f,$

with $h$ given by (16) and $f$ constant, for which the associated Euler-
Lagrange equations represent (up to a sign) the SW equations (20), that is,
the potential form of the SW equations.

It can be checked that the formula for the conserved quantity is indeed that
given in Equation (19), as the new invariants $u$ and $v$ make no essential
difference to the computation.

Example 2: the semi-geostrophic SW equations In the past thirty years, the
semi-geostrophic equations have become a model for describing atmospheric
motions on a synoptic scale, including the presence of fronts [9, 12].

The semi-geostrophic approximation to equations (17) is the replacement of the
true acceleration by the time derivative of the vector

$u_{g}=-\frac{g}{f}h_{y},\qquad v_{g}=\frac{g}{f}h_{x},$ (22)

following the particle. This vector field is called the geostrophic velocity.
Thus, the semi-geostrophic approximation seeks to find motions satisfying

$\displaystyle\dot{u}_{g}+gh_{x}-f\dot{y}$ $\displaystyle=0,$ (23a)
$\displaystyle\dot{v}_{g}+gh_{y}+f\dot{x}$ $\displaystyle=0.$ (23b)

It is also known that the semi-geostrophic potential vorticity, given by

$\Omega^{*}=\frac{1}{h}\left(f+\frac{\partial v_{g}}{\partial
x}-\frac{\partial u_{g}}{\partial
y}+\frac{1}{f}\frac{\partial(u_{g},v_{g})}{\partial(x,y)}\right),$ (24)

is conserved on particles [11].

The classical form of the SG equations (23) are

$\displaystyle
hh_{b}\dot{x_{a}}-hh_{a}\dot{x_{b}}+(\dot{h}h_{b}+h\dot{h_{b}})x_{a}-(\dot{h}h_{a}+h\dot{h_{a}})x_{b}+fhh_{b}y_{a}-fhh_{a}y_{b}$
$\displaystyle=-\frac{f^{2}}{g}\dot{y},$ (25a) $\displaystyle
hh_{b}\dot{y_{a}}-hh_{a}\dot{y_{b}}+(\dot{h}h_{b}+h\dot{h_{b}})y_{a}-(\dot{h}h_{a}+h\dot{h_{a}})y_{b}-fhh_{b}x_{a}+fhh_{a}x_{b}$
$\displaystyle=\frac{f^{2}}{g}\dot{x},$ (25b)

with $h$ given by (16). This system is obtained after substituting the
functions $u_{g}$ and $v_{g}$ given by (22) into (23).

The potential form of the SG equations is given by (22) and (23), i.e.

$\displaystyle u_{g}$ $\displaystyle=-\frac{g}{f}h(x_{a}h_{b}-x_{b}h_{a}),$
(26a) $\displaystyle v_{g}$
$\displaystyle=\frac{g}{f}h(y_{b}h_{a}-y_{a}h_{b}),$ (26b)
$\displaystyle\dot{u}_{g}$
$\displaystyle+gh(y_{b}h_{a}-y_{a}h_{b})-f\dot{y}=0,$ (26c)
$\displaystyle\dot{v}_{g}$
$\displaystyle+gh(x_{a}h_{b}-x_{b}h_{a})+f\dot{x}=0,$ (26d)

where $f$ is a nonzero constant and $h$ is given by (16).

The SW equations (26) represent the Euler-Lagrange equations associated with
the first-order Lagrangian [5]

$\mathcal{L}=(u_{g}-R)\dot{x}+(v_{g}+P)\dot{y}-\tfrac{1}{2}(u_{g}^{2}+v_{g}^{2}+gh)-r\dot{u}_{g}+p\dot{v}_{g},$
(27)

where $P(x,y)$, $R(x,y)$, $p(u_{g},v_{g})$ and $r(u_{g},v_{g})$ are arbitrary
functions satisfying

$P_{x}+R_{y}=f,\qquad p_{u_{g}}+r_{v_{g}}={1/f},$ (28)

and $h$ is given by (16).

This case requires an extension of the theory elaborated above as we have
additional invariants with time derivatives. Working through the calculations
of the conserved quantity, we obtain

$\frac{{\rm d}}{{\rm d}t}\left(\frac{{\rm d}}{{\rm
d}b}\left(x_{a}\frac{\partial L}{\partial x_{t}}+y_{a}\frac{\partial
L}{\partial y_{t}}+u_{g,a}\frac{\partial
L}{\partial\dot{u_{g}}}+v_{g,a}\frac{\partial
L}{\partial\dot{v_{g}}}\right)-\frac{{\rm d}}{{\rm
d}a}\left(x_{b}\frac{\partial L}{\partial x_{t}}+y_{b}\frac{\partial
L}{\partial y_{t}}+u_{g,b}\frac{\partial
L}{\partial\dot{u_{g}}}+v_{g,b}\frac{\partial
L}{\partial\dot{v_{g}}}\right)\right)=0,$ (29)

The conserved quantity is straightforwardly shown to be that given in Equation
24, using the definitions of the operators in Equation (11) and noting that,
for example,

$\frac{\partial}{\partial x}\frac{\partial
L}{\partial\dot{u_{g}}}=\frac{\partial r}{\partial x}=\frac{\partial
r}{\partial u_{g}}\frac{\partial u_{g}}{\partial x}+\frac{\partial r}{\partial
v_{g}}\frac{\partial v_{g}}{\partial x}$

and similarly for

$\frac{\partial}{\partial y}\frac{\partial
L}{\partial\dot{u_{g}}},\qquad\frac{\partial}{\partial x}\frac{\partial
L}{\partial\dot{v_{g}}},\qquad\frac{\partial}{\partial y}\frac{\partial
L}{\partial\dot{v_{g}}}$

appearing in Equation (29), and finally using Equation (28).

##  3 Noether identities for numerical variational problems – Finite Element

We now look at the Finite Element Noether identity, developed by the author
with T. Pryer, [6]. We treat the approximate Lagrangian as an exact problem,
and require invariance of the Finite Element Lagrangian. We no longer have
point wise invariance, and so the Finite Element Noether identity will be an
integral expression.

We consider the Lagrangian, $\int L(x,u,u_{x})\,{\rm d}x$. The Finite Element
Euler Lagrange equations for the Finite Element solution $U$ are

$0=\int_{\Omega}E^{u}\big{|}_{u=U}V+\int_{\mathcal{F}}\left[\kern-3.0pt\left[{\frac{\partial
L}{\partial U_{x}}}\right]\kern-3.0pt\right]V,\qquad\forall V\in\mathbb{V}.$
(30)

where $\mathbb{V}$ is an appropriate space of piecewise continuous polynomial
functions over a triangulation, and where $E^{u}|_{u=U}=-\left({{\rm d}}/{{\rm
d}x}\right){\partial L}/{\partial U_{x}}+{\partial L}/{\partial U}.$ The
Finite Element Noether Identity is

$\begin{split}0&=\int_{\Omega}E^{u}\big{|}_{u=U}\left(\phi-
U_{x}\xi\right)+\int_{\mathcal{F}}\left[\kern-3.0pt\left[{\frac{\partial
L}{\partial U_{x}}\left(\phi-
U_{x}\xi\right)+L\xi}\right]\kern-3.0pt\right]\end{split}$ (31)

where $\xi$ and $\phi$ are the infinitesimals defined in Equation (3). Thus,
for example, for the conservation of linear momentum, where the group action
is translation in $x$, so that $\widetilde{x}=x+\epsilon$, we must have that
$L$ does not depend explicitly on $x$. Then the infinitesimals of Equation (8)
are given by $(\xi,\phi)=(1,0)$ and the Noether identity for this symmetry is
given by

$\begin{split}0&=\int_{\Omega}E^{u}\big{|}_{u=U}\left(-U_{x}\right)+\int_{\mathcal{F}}\left[\kern-3.0pt\left[{\frac{\partial
L}{\partial U_{x}}\left(-U_{x}\right)+L}\right]\kern-3.0pt\right].\end{split}$
(32)

This compares to the smooth case where we would have ${\rm d}/{\rm
d}x\left(L-u_{x}\partial L/\partial u_{x}\right)=0$. We note that the term
incorporating the Euler Lagrange equations in the FE identity, cannot be set
to zero, as it is not the case that $\phi-U_{X}\xi$ is in the test space in
general.

We now turn to the FE case and consider our FE Noether identities given by the
particle relabelling symmetry, for the Lagrangian in (10). The infinitesimals
needed to express the identity, analogous to those in Equation (8), for
$(a,b,t,x,y)$ are $(\xi^{a},\xi^{b},\xi^{t},\phi^{x},\phi^{y})$, and satisfy

$\frac{\partial\xi^{a}}{\partial a}+\frac{\partial\xi^{b}}{\partial
b}=0,\quad\xi^{t}=0,\quad\phi^{x}=0,\quad\phi^{y}=0.$

We suppose that the domain $\overline{\Omega}$ is made up of domains of the
form $\overline{\Omega}_{i,n}=\Omega_{i}\times[t_{n},t_{n+1}]$ where
$\Omega_{i}\subset(a,b)$-space.

Locally we may set $\xi^{a}=\partial_{b}\varphi=\varphi_{b}$ and
$\xi^{b}=-\partial_{a}\varphi=\varphi_{a}$ for some smooth function $\varphi$,
and then the FE Noether identity in this case, takes the form

$\begin{array}[]{rcl}0&=&\displaystyle\sum_{i}\int_{\overline{\Omega}_{i,n}}\left[\left(\varphi_{a}X_{b}-\varphi_{b}X_{a}\right)E^{x}|_{x=X}+\left(\varphi_{a}Y_{b}-\varphi_{b}Y_{a}\right)E^{y}|_{y=Y}\right]\,{\rm
d}a\,{\rm d}b\,{\rm d}t\\\\[12.0pt]
&&\displaystyle\qquad+\left(\int_{\Omega_{i}\times\\{t_{n+1}\\}}-\int_{\Omega_{i}\times\\{t_{n}\\}}\right)\left(\left(\varphi_{a}X_{b}-\varphi_{b}X_{a}\right)\frac{\partial
L}{\partial
X_{t}}+\left(\varphi_{a}Y_{b}-\varphi_{b}Y_{a}\right)\frac{\partial
L}{\partial Y_{t}}\right)\,{\rm d}a\,{\rm d}b\\\\[12.0pt]
&&\displaystyle\qquad+\int_{t_{n}}^{t_{n+1}}\int_{\gamma_{i}(s)=\partial\Omega_{i}}\left[\kern-2.0pt\left[L+\Delta\frac{\partial
L}{\partial\Delta}\right]\kern-2.0pt\right]\Big{|}_{\gamma_{i}}\frac{{\rm
d}}{{\rm d}s}\varphi(\gamma_{i}(s))\,{\rm d}s\,{\rm d}t.\end{array}$ (33)

This is simply the three dimensional analogue of the above equation (31),
adapted to two dependent variables and the given infinitesimals for this group
action.

We now show that the continuum limit of the identity (33) is indeed the
conservation law (13).

If $|t_{n+1}-t_{n}|$ is small, we have for any continuous integrand $F$, that
there exists $\tau$, $t_{n}<\tau<t_{n+1}$ such that

$\int_{t_{n}}^{t_{n+1}}F(t)\,{\rm d}t=(t_{n+1}-t_{n})F(\tau),$

by the mean value theorem. We apply this result to the first and third
integrals in Equation (33). Doing this, then dividing through by
$(t_{n+1}-t_{n})$ and sending $t_{n+1}\rightarrow t_{n}$, the first and third
intervals limit to the integral over $\Omega_{i}$ at $t=t_{n}$. The second
integral in Equation (33) limits to a derivative with respect to $t$. We thus
obtain, for any smooth function $\varphi$, that

$\begin{split}0&=\displaystyle\sum_{i}\int_{\bar{\Omega}_{i}}\left[\left(\varphi_{a}X_{b}-\varphi_{b}X_{a}\right)E^{x}|_{x=X}+\left(\varphi_{a}Y_{b}-\varphi_{b}Y_{a}\right)E^{y}|_{y=Y}\right]\,{\rm
d}a\,{\rm d}b\\\ &\displaystyle\qquad+\frac{{\rm d}}{{\rm
d}t}\int_{\Omega_{i}}\left\\{\varphi_{a}\left(X_{b}\frac{\partial L}{\partial
X_{t}}+Y_{b}\frac{\partial L}{\partial
Y_{t}}\right)-\varphi_{b}\left(X_{a}\frac{\partial L}{\partial
X_{t}}+Y_{a}\frac{\partial L}{\partial Y_{t}}\right)\right\\}{\rm d}a\,{\rm
d}b\\\
&\displaystyle\qquad+\int_{\gamma_{i}(s)=\partial\Omega_{i}}\left.\left[\kern-2.0pt\left[L+\Delta\frac{\partial
L}{\partial\Delta}\right]\kern-2.0pt\right]\right|_{\gamma_{i}}\frac{{\rm
d}}{{\rm d}s}\varphi(\gamma_{i}(s))\,{\rm d}s.\end{split}$ (34)

Finally, we observe that Equation (34) is the weak form of the smooth law.
Indeed, for a strong solution of the Euler Lagrange equations, the $E^{x}$,
$E^{y}$ terms are zero, as is the jump term in the third integrand. Taking
$\varphi$ to be a bump function with support anywhere inside a mesh simplex,
then integration by parts yields the same cross-derivative as that yielding
the smooth potential vorticity, to be zero.

Equation (34) is straightforwardly extended to the potential forms of the
equations and their Lagrangians in the examples in Section 2.2.

## References

  * [1]
  * [2] T.J. Bridges, P.E. Hydon and S. Reich, Vorticity and symplecticity in Lagrangian fluid dynamics, J. Phys. A: Math. Gen., 38 (2005) 1403-1418.
  * [3] N. Bîlǎ, E.L. Mansfield and P.A. Clarkson, Symmetry group analysis of the shallow water and semi-geostrophic equations, Quart. J. Mech. Appl. Math., 59 (2006) 95–123.
  * [4] P.E. Hydon, Multisymplectic conservation laws for differential and differential-difference equations,  Proc. Roy. Soc. A, 461 (2005) 1627–1637.
  * [5] P.E. Hydon, private communication (2000).
  * [6] E.L. Mansfield and T. Pryer, Noether type discrete conserved quantities arising from a finite element approximation of a variational problem, arXiv:1207.7188 [math.NA]
  * [7] P.J. Olver, Applications of Lie Groups to differential equations, second edition, Springer, 1993.
  * [8] N. Padhye and P.J. Morrison, Fluid element relabelling symmetry, Phys. Lett., A219 (1996) 287–292.
  * [9] I. Roulstone and J. Norbury, Hamiltonian structure with contact geometry for the semi-geostrophic equations, J. Fluid Mech., 272 (1994) 211–233.
  * [10] I. Roulstone and J. Norbury, Computing Superstorm Sandy, Scientific American, 309 (2013) 22.
  * [11] I. Roulstone and M.J. Sewell, Potential vorticities in semi-geostrophic theory, Q. J. Roy. Met. Soc., 122 (1996) 983–992.
  * [12] I. Roulstone and M.J. Sewell, The mathematical structure of theories of semigeostrophic type, Phil. Trans. R. Soc. Lond. A, 355 (1997) 2489–2517.
  * [13] V.N. Rubtsov and I. Roulstone, Holomorphic structures in hydrodynamical models of nearly geostrophic flow, Proc. R. Soc. Lond. A, 457 (2001) .
  * [14] R. Salmon, Practical use of Hamiltonian’s principle, J. Fluid Mech., 132 (1983) 431–444.