Peano
Loading...
Searching...
No Matches
meteotsunami-r1 Namespace Reference

Functions

float manning_coefficient (float H, float z0=0.003)
 Compute the Manning coefficient n based on the Chezy formulation:
 

Variables

int L = 300e3
 
list physical_offset = [-39870.0, 0.0]
 
list physical_size = [379700.0, L / 3]
 
 square_side = max(physical_size)
 
list offset
 
list size = [square_side, square_side]
 
int H = 50
 
float manning_coefficient_value = manning_coefficient(H)
 
str initial_conditions
 
str boundary_conditions
 
str is_physically_admissible
 
 parser = exahype2.ArgumentParser()
 
 min_depth
 
 end_time
 
 degrees_of_freedom
 
 args = parser.parse_args()
 
dict constants
 
float max_h = 1.1 * min(physical_size) / (3.0**args.min_depth)
 
float min_h = max_h * 3.0 ** (-args.amr_levels)
 
int dg_order = args.degrees_of_freedom - 1
 
 aderdg_solver
 
 flux
 
 ncp
 
 max_eigenvalue
 
 riemann_solver
 
 source_term
 
 fv_solver
 
 limiter_solver
 
 project
 
float time_in_between_plots = 0.0
 
 dimensions
 
 min_end_time
 
 max_end_time
 
 first_plot_time_stamp
 
 periodic_BC
 
 mode
 
 const_val
 
 const_type
 
 make
 
 True
 
 make_clean_first
 
 throw_away_data_after_build
 

Function Documentation

◆ manning_coefficient()

float meteotsunami-r1.manning_coefficient ( float H,
float z0 = 0.003 )

Compute the Manning coefficient n based on the Chezy formulation:

C = 18 * log(0.37 * H / z0)
n = H^(1/6) / C

Parameters

H : float Water depth in meters. z0 : float, optional Roughness length in meters (default: 0.003).

Returns

n : float Manning coefficient (dimensionless).

Definition at line 20 of file meteotsunami-r1.py.

Variable Documentation

◆ aderdg_solver

meteotsunami-r1.aderdg_solver
Initial value:
1= exahype2.solvers.aderdg.GlobalAdaptiveTimeStep(
2 name="ADERDGSolver",
3 order=dg_order,
4 unknowns={"h": 1, "hu": 1, "hv": 1, "z": 1},
5 auxiliary_variables=0,
6 min_cell_h=min_h,
7 max_cell_h=max_h,
8 time_step_relaxation=0.9,
9)

Definition at line 151 of file meteotsunami-r1.py.

◆ args

meteotsunami-r1.args = parser.parse_args()

Definition at line 128 of file meteotsunami-r1.py.

◆ boundary_conditions

meteotsunami-r1.boundary_conditions
Initial value:
1= """
2 if (normal == 0) {
3 // x-normal: left and right boundary
4 // transmissive
5 Qoutside[0] = Qinside[0];
6 Qoutside[1] = Qinside[1];
7 Qoutside[2] = Qinside[2];
8 Qoutside[3] = Qinside[3];
9 } else if (normal == 1) {
10 // y-normal: top and bottom boundary
11 // wall boundary
12 Qoutside[0] = Qinside[0];
13 Qoutside[1] = Qinside[1];
14 Qoutside[2] = -Qinside[2];
15 Qoutside[3] = Qinside[3];
16 }
17"""

Definition at line 79 of file meteotsunami-r1.py.

◆ const_type

meteotsunami-r1.const_type

Definition at line 277 of file meteotsunami-r1.py.

◆ const_val

meteotsunami-r1.const_val

Definition at line 277 of file meteotsunami-r1.py.

◆ constants

dict meteotsunami-r1.constants
Initial value:
1= {
2 "g": [9.81, "double"],
3 "hThreshold": [1e-5, "double"],
4 "PhysicalDomainOffsetX": [physical_offset[0], "double"],
5 "PhysicalDomainOffsetY": [physical_offset[1], "double"],
6 "PhysicalDomainSizeX": [physical_size[0], "double"],
7 "PhysicalDomainSizeY": [physical_size[1], "double"],
8 "water_density": [1000, "double"],
9 "manning_param": [manning_coefficient_value, "double"],
10 "corriolis_param": [9.35e-5, "double"],
11 "pressure": [100, "double"],
12 "speed_pressure": [22.15, "double"],
13 "period_pressure": [1800, "double"],
14 "background_pressure": [101300, "double"],
15}

Definition at line 130 of file meteotsunami-r1.py.

◆ degrees_of_freedom

meteotsunami-r1.degrees_of_freedom

Definition at line 126 of file meteotsunami-r1.py.

◆ dg_order

int meteotsunami-r1.dg_order = args.degrees_of_freedom - 1

Definition at line 149 of file meteotsunami-r1.py.

◆ dimensions

meteotsunami-r1.dimensions

Definition at line 261 of file meteotsunami-r1.py.

◆ end_time

meteotsunami-r1.end_time

Definition at line 125 of file meteotsunami-r1.py.

◆ first_plot_time_stamp

meteotsunami-r1.first_plot_time_stamp

Definition at line 266 of file meteotsunami-r1.py.

◆ flux

meteotsunami-r1.flux

Definition at line 164 of file meteotsunami-r1.py.

◆ fv_solver

meteotsunami-r1.fv_solver
Initial value:
1= exahype2.solvers.fv.godunov.GlobalAdaptiveTimeStep(
2 name="FVSolver",
3 patch_size=dg_order * 2 + 1,
4 unknowns={"h": 1, "hu": 1, "hv": 1},
5 auxiliary_variables={"z": 1},
6 min_volume_h=min_h,
7 max_volume_h=max_h,
8 time_step_relaxation=0.9,
9)

Definition at line 211 of file meteotsunami-r1.py.

◆ H

int meteotsunami-r1.H = 50

Definition at line 47 of file meteotsunami-r1.py.

◆ initial_conditions

meteotsunami-r1.initial_conditions
Initial value:
1= f"""
2 static tarch::reader::NetCDFFieldParser fieldParser(
3 "bathymetry/test_R1_dx100_H{H}_b.grd",
4 PhysicalDomainSizeX,
5 PhysicalDomainSizeY,
6 PhysicalDomainOffsetX,
7 PhysicalDomainOffsetY,
8 "z",
9 "x",
10 "y"
11 );
12
13 // TODO: This sampling is needed to make the square domain works without NaNs. However, it gives unphysical solutions.
14 // The setup should be a rectangular domain, but this breaks limiting. The limiter needs to be fixed first.
15 const double sampleX =
16 x(0) < PhysicalDomainOffsetX ? PhysicalDomainOffsetX :
17 (x(0) > PhysicalDomainOffsetX + PhysicalDomainSizeX ? PhysicalDomainOffsetX + PhysicalDomainSizeX : x(0));
18 const double sampleY =
19 x(1) < PhysicalDomainOffsetY ? PhysicalDomainOffsetY :
20 (x(1) > PhysicalDomainOffsetY + PhysicalDomainSizeY ? PhysicalDomainOffsetY + PhysicalDomainSizeY : x(1));
21
22 const double bathymetry = fieldParser.sampleTopology(sampleX, sampleY);
23 Q[Shortcuts::h] = -std::min(bathymetry, 0.0);
24 Q[Shortcuts::hu] = 0.0;
25 Q[Shortcuts::hv] = 0.0;
26 Q[Shortcuts::z] = bathymetry;
27"""

Definition at line 51 of file meteotsunami-r1.py.

◆ is_physically_admissible

str meteotsunami-r1.is_physically_admissible
Initial value:
1= """
2 if (x(0) < PhysicalDomainOffsetX or x(0) > PhysicalDomainOffsetX + PhysicalDomainSizeX) {
3 return false;
4 }
5 if (x(1) < PhysicalDomainOffsetY or x(1) > PhysicalDomainOffsetY + PhysicalDomainSizeY) {
6 return false;
7 }
8
9 if (std::abs(x[0] - DomainOffset[0]) < h[0] or std::abs(x[0] - DomainOffset[0] - DomainSize[0]) < h[0]) {
10 return false;
11 }
12 if (std::abs(x[1] - DomainOffset[1]) < h[1] or std::abs(x[1] - DomainOffset[1] - DomainSize[1]) < h[1]) {
13 return false;
14 }
15
16 if (x(0) - PhysicalDomainOffsetX > 0.85 * PhysicalDomainSizeX) {
17 return false;
18 }
19 if (x(0) - PhysicalDomainOffsetX < 0.15 * PhysicalDomainSizeX) {
20 return false;
21 }
22
23 return true;
24"""

Definition at line 97 of file meteotsunami-r1.py.

◆ L

int meteotsunami-r1.L = 300e3

Definition at line 8 of file meteotsunami-r1.py.

◆ limiter_solver

meteotsunami-r1.limiter_solver
Initial value:
1= exahype2.solvers.limiting.StaticLimiting(
2 name="LimiterSolver",
3 regular_solver=aderdg_solver,
4 limiting_solver=fv_solver,
5 physical_admissibility_criterion=is_physically_admissible,
6)

Definition at line 236 of file meteotsunami-r1.py.

◆ make

meteotsunami-r1.make

Definition at line 280 of file meteotsunami-r1.py.

◆ make_clean_first

meteotsunami-r1.make_clean_first

Definition at line 280 of file meteotsunami-r1.py.

◆ manning_coefficient_value

float meteotsunami-r1.manning_coefficient_value = manning_coefficient(H)

Definition at line 48 of file meteotsunami-r1.py.

◆ max_eigenvalue

meteotsunami-r1.max_eigenvalue

Definition at line 166 of file meteotsunami-r1.py.

◆ max_end_time

meteotsunami-r1.max_end_time

Definition at line 265 of file meteotsunami-r1.py.

◆ max_h

float meteotsunami-r1.max_h = 1.1 * min(physical_size) / (3.0**args.min_depth)

Definition at line 147 of file meteotsunami-r1.py.

◆ min_depth

meteotsunami-r1.min_depth

Definition at line 124 of file meteotsunami-r1.py.

◆ min_end_time

meteotsunami-r1.min_end_time

Definition at line 264 of file meteotsunami-r1.py.

◆ min_h

float meteotsunami-r1.min_h = max_h * 3.0 ** (-args.amr_levels)

Definition at line 148 of file meteotsunami-r1.py.

◆ mode

meteotsunami-r1.mode

Definition at line 274 of file meteotsunami-r1.py.

◆ ncp

meteotsunami-r1.ncp

Definition at line 165 of file meteotsunami-r1.py.

◆ offset

meteotsunami-r1.offset
Initial value:
1= [
2 physical_offset[0] - 0.5 * (square_side - physical_size[0]),
3 physical_offset[1] - 0.5 * (square_side - physical_size[1]),
4]

Definition at line 13 of file meteotsunami-r1.py.

◆ parser

meteotsunami-r1.parser = exahype2.ArgumentParser()

Definition at line 122 of file meteotsunami-r1.py.

◆ periodic_BC

meteotsunami-r1.periodic_BC

Definition at line 268 of file meteotsunami-r1.py.

◆ physical_offset

list meteotsunami-r1.physical_offset = [-39870.0, 0.0]

Definition at line 9 of file meteotsunami-r1.py.

◆ physical_size

list meteotsunami-r1.physical_size = [379700.0, L / 3]

Definition at line 10 of file meteotsunami-r1.py.

◆ project

meteotsunami-r1.project
Initial value:
1= exahype2.Project(
2 namespace=["applications", "exahype2", "ShallowWater"],
3 project_name="Meteotsunami",
4 directory=".",
5 executable="ExaHyPE",
6)

Definition at line 243 of file meteotsunami-r1.py.

◆ riemann_solver

meteotsunami-r1.riemann_solver

Definition at line 167 of file meteotsunami-r1.py.

◆ size

meteotsunami-r1.size = [square_side, square_side]

Definition at line 17 of file meteotsunami-r1.py.

◆ source_term

meteotsunami-r1.source_term

Definition at line 200 of file meteotsunami-r1.py.

◆ square_side

meteotsunami-r1.square_side = max(physical_size)

Definition at line 11 of file meteotsunami-r1.py.

◆ throw_away_data_after_build

meteotsunami-r1.throw_away_data_after_build

Definition at line 280 of file meteotsunami-r1.py.

◆ time_in_between_plots

meteotsunami-r1.time_in_between_plots = 0.0

Definition at line 255 of file meteotsunami-r1.py.

◆ True

meteotsunami-r1.True

Definition at line 280 of file meteotsunami-r1.py.