Template:Gravity Waves Courant Number: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(11 intermediate revisions by 6 users not shown)
Line 2: Line 2:
__NOTOC__
__NOTOC__
===Gravity Waves Courant Number===
===Gravity Waves Courant Number===
The Courant number is a spatially varied (dataset) dimensionless value representing the time a particle stays in a cell of a mesh/grid. This is based on the size of the element and the speed of that particle.
The Courant number tool is intended to assist in the selection of a time step for a numerical simulation or evaluation of stability of the simulation.
A Courant number of 1.0 implies that a particle(parcel or drop of water) would take one time step to flow through the element. Since cells/elements are not guaranteed to align with the flow field, this number is an approximation. This dataset is computed at nodes so it is uses the average size of the cells/elements attached to the node. Since the typical Courant number calculation requires as an input a velocity as shown in the equation below:
This tool can be thought of as the inverse of the ''Gravity Waves Time Step'' tool.
<!--
The Courant number is a spatially varied dimensionless value (dataset) representing the time a particle stays in a cell of a mesh/grid. This is based on the size of the element and the speed of that particle.
The toolbox includes a tool for calculating the Courant number given the time step.
A Courant number of 1.0 implies that a particle(parcel or drop of water) would take one time step to flow through the element. Since cells/elements are not guaranteed to align with the flow field, this number is an approximation. This dataset is computed at nodes so it uses the average size of the cells/elements attached to the node. The size is computed in meters if the geometry (mesh / UGrid / ...) is in geographic space.  
:Note: the variable here is depth, not elevation. For applications relative to mean sea level, using the negative of the elevation relative to a datum is acceptable, but if the water level will vary, the depth is actually the water level minus the ground elevation.-->
:<math>{\displaystyle CourantNumber=TimeStep*(Gravity*Depth)^{0.5}/NodalSpacing}</math>
:*Time Step: a user specified constant
:*NodalSpacing: dependent on the computational grid/mesh
:*Velocity: typcially computed by hydrodynamic simulation


As noted above, the velocity is typically output from a simulation, so this tool approximates velocity based on the speed of a gravity wave through the water column.
A Courant number calculation requires as an input a velocity as shown in the equation below:


The speed of wave propogation is depentdent on the depth of the water column. For purposes of this tool, the speed is assumed to be:
:<math>{\displaystyle CourantNumber=TimeStep*Velocity/NodalSpacing}</math>
:<math>Velocity = TimeStep*(Gravity*Depth)^{0.5}</math>
:*Time Step: a user specified desired timestep size
:*Velocity: speed (celerity) of a gravity wave traveling through the medium
:*NodalSpacing: Average length of the edges connected to each node of the candidate grid/mesh (converted to meters if working in geographic coordinates)


:Note: the variable in the equation above is "Depth", not "Elevation".
This tool approximates velocity based on the speed of a gravity wave through the water column, which is dependent on the depth of the water column. For purposes of this tool, the speed is assumed to be:
Depth is also typically output from a hydrodynamic simulation. For this tool it can be approximated as:
:<math>Velocity = (Gravity*Depth)^{0.5}</math>
:<math>Depth = Max(WaterLevel - GroundElevation, Minimum Depth)</math>
For coastal applications the water level can be assumed as 0.0 (Mean Sea Level) or a constant offset from MSL.


For riverine appliations the water level is more difficult to approximate. It may require computing a sloped plane. In this case, negative values should be filtered out.
:Note: the variable in the equation above is "Depth", not "Elevation". For this tool, the input dataset can be the elevation or a computed depth. If an elevation is used, the sign is inverted because SMS convention is elevation up.


In all cases, the depth should be truncated to a minimum value. Velocity only exists in a water column with positive depth.
Since the equation for velocity requires a positive value for depth, the depth is forced to be at least 0.1 for the calculation. If the input dataset is elevation, the depth used for computation of the time step is:
:<math>Applied Depth = Max(-Elevation, 0.1)</math>
If the input dataset is depth, the depth used for computation of the time step is:
:<math>Applied Depth = Max(Depth, 0.1)</math>
 
This is assuming that the water level is approximately 0.0 (Mean Sea Level).
 
If the water level is not relatively flat or not near 0.0, the best practice approach would be to compute a depth and use that dataset directly. Depth can be computed as:
:<math>Depth = Eta - Ground Elevation</math>
:*Eta: water surface elevation (usually computed by a hydrodynamic model).
 
In SMS, both of these are measured from a common datum with positive upwards.
   
   
The tool computes the Courant number at each node in the selected geometry based on the specified time step.
The tool computes the Courant number at each node in the selected geometry based on the specified time step.


If the input velocity magnitude dataset is transient, the resulting CourantNumber dataset will also be transient.
If the input velocity magnitude dataset is transient, the resulting Courant Number dataset will also be transient.


For numerical solvers that are Courant limited/controlled, any violation of the Courant condition, where the Courant number exceeds the allowable threshold could result in instability.
For numerical solvers that are Courant limited/controlled, any violation of the Courant condition, where the Courant number exceeds the allowable threshold could result in instability. Therefore, the maximum of the Courant number dataset gives an indication of the stability of this mesh for the specified time step parameter.
Therefore, the maximum of the Courant number dataset gives an indication of the stability of this mesh for the specified time step parameter.


This tool is intended to assist with numerical engine stability, and possibly the selection of an appropriate time step size.
This tool is intended to assist with numerical engine stability, and possibly the selection of an appropriate time step size.


The ''Gravity Waves Courant Number'' tool dialog has the following options:
The ''Gravity Waves Courant Number'' tool dialog has the following options:
====Input Paramters====
====Input Parameters====
*''Input dataset'' &ndash; This is a required input parameter. Specify which velocity dataset will be used to represent particle velocity magnitude.
*''Input dataset'' &ndash; Specify the elevation dataset (or depth dataset if using depth option).
*''Gravity'' &ndash; Enter the gravity value.  
*''Input dataset is depth'' &ndash; Specify if the input dataset is depth.
*''Use time step'' &ndash; Enter the computational time step value.
*''Gravity'' &ndash; Enter the gravity value in m/s&sup2;. Default is 9.80665.
*''Use time step'' &ndash; Enter the computational time step value in seconds. Default is 1.0.
 
====Output Parameters====
====Output Parameters====
*''Gravity waves time step dataset'' &ndash;  Enter the name for the new gravity wave Courant number dataset. It is recommended to specify a name that references the input. Typically this would include the time step used in the calculation. The velocity dataset used could be referenced. The geometry is not necessary because the dataset resides on that geometry.
*''Gravity waves courant number data set'' &ndash;  Enter the name for the new gravity wave Courant number dataset. It is recommended to specify a name that references the input. Typically this would include the time step used in the calculation. The velocity dataset used could be referenced. The geometry is not necessary because the dataset resides on that geometry.


====Related Topics====
====Related Topics====
* [[Template:Advective Courant Number|Advective Courant Number]]
* [[Advective Courant Number Tool|Advective Courant Number]]


<noinclude>[[Category:Tools]]</noinclude>
<noinclude>[[Category:Toolbox Datasets]]</noinclude>

Latest revision as of 14:45, 1 July 2024


Gravity Waves Courant Number

The Courant number tool is intended to assist in the selection of a time step for a numerical simulation or evaluation of stability of the simulation. This tool can be thought of as the inverse of the Gravity Waves Time Step tool. The Courant number is a spatially varied dimensionless value (dataset) representing the time a particle stays in a cell of a mesh/grid. This is based on the size of the element and the speed of that particle. A Courant number of 1.0 implies that a particle(parcel or drop of water) would take one time step to flow through the element. Since cells/elements are not guaranteed to align with the flow field, this number is an approximation. This dataset is computed at nodes so it uses the average size of the cells/elements attached to the node. The size is computed in meters if the geometry (mesh / UGrid / ...) is in geographic space.

A Courant number calculation requires as an input a velocity as shown in the equation below:

  • Time Step: a user specified desired timestep size
  • Velocity: speed (celerity) of a gravity wave traveling through the medium
  • NodalSpacing: Average length of the edges connected to each node of the candidate grid/mesh (converted to meters if working in geographic coordinates)

This tool approximates velocity based on the speed of a gravity wave through the water column, which is dependent on the depth of the water column. For purposes of this tool, the speed is assumed to be:

Note: the variable in the equation above is "Depth", not "Elevation". For this tool, the input dataset can be the elevation or a computed depth. If an elevation is used, the sign is inverted because SMS convention is elevation up.

Since the equation for velocity requires a positive value for depth, the depth is forced to be at least 0.1 for the calculation. If the input dataset is elevation, the depth used for computation of the time step is:

If the input dataset is depth, the depth used for computation of the time step is:

This is assuming that the water level is approximately 0.0 (Mean Sea Level).

If the water level is not relatively flat or not near 0.0, the best practice approach would be to compute a depth and use that dataset directly. Depth can be computed as:

  • Eta: water surface elevation (usually computed by a hydrodynamic model).

In SMS, both of these are measured from a common datum with positive upwards.

The tool computes the Courant number at each node in the selected geometry based on the specified time step.

If the input velocity magnitude dataset is transient, the resulting Courant Number dataset will also be transient.

For numerical solvers that are Courant limited/controlled, any violation of the Courant condition, where the Courant number exceeds the allowable threshold could result in instability. Therefore, the maximum of the Courant number dataset gives an indication of the stability of this mesh for the specified time step parameter.

This tool is intended to assist with numerical engine stability, and possibly the selection of an appropriate time step size.

The Gravity Waves Courant Number tool dialog has the following options:

Input Parameters

  • Input dataset – Specify the elevation dataset (or depth dataset if using depth option).
  • Input dataset is depth – Specify if the input dataset is depth.
  • Gravity – Enter the gravity value in m/s². Default is 9.80665.
  • Use time step – Enter the computational time step value in seconds. Default is 1.0.

Output Parameters

  • Gravity waves courant number data set – Enter the name for the new gravity wave Courant number dataset. It is recommended to specify a name that references the input. Typically this would include the time step used in the calculation. The velocity dataset used could be referenced. The geometry is not necessary because the dataset resides on that geometry.

Related Topics