Peano
Loading...
Searching...
No Matches
fv-coupling Namespace Reference

Variables

 parser = exahype2.ArgumentParser("ExaHyPE 2 - Finite Volumes Coupling Testing Script")
 min_depth
 degrees_of_freedom
 end_time
 number_of_snapshots
 periodic_boundary_conditions_x
 periodic_boundary_conditions_y
 periodic_boundary_conditions_z
 args = parser.parse_args()
float max_h = 1.1 / 3.0**args.min_depth
float min_h = max_h * 3.0 ** (-args.amr_levels)
dict euler_unknowns
 EULER #.
str euler_initial_conditions
str euler_boundary_conditions
str compute_primitive_variables
str euler_max_eigenvalue
str euler_flux
 euler_solver
 initial_conditions
 boundary_conditions
 flux
 max_eigenvalue
dict advection_unknowns = {"scalar": 1}
 ADVECTION #.
dict advection_auxiliary_variables
str advection_initial_conditions
str advection_boundary_conditions
str advection_flux
str advection_max_eigenvalue
 advection_solver
 _compute_time_step_size
 COUPLING #.
 number_of_variables_euler = euler_solver.auxiliary_variables + euler_solver.unknowns
tuple number_of_variables_advection
 last_solver
 project
 PROJECT #.
float time_in_between_plots = 0.0
 dimensions
 size
 offset
 min_end_time
 max_end_time
 first_plot_time_stamp
 periodic_BC
 mode
 make
 True
 make_clean_first
 throw_away_data_after_build

Variable Documentation

◆ _compute_time_step_size

fv-coupling._compute_time_step_size
protected

COUPLING #.

Definition at line 194 of file fv-coupling.py.

◆ advection_auxiliary_variables

dict fv-coupling.advection_auxiliary_variables
Initial value:
1= {
2 "rho": 1,
3 "rhoU": 1,
4 "rhoV": 1,
5}

Definition at line 126 of file fv-coupling.py.

◆ advection_boundary_conditions

str fv-coupling.advection_boundary_conditions
Initial value:
1= """
2 // Reflective boundary conditions
3 Qoutside[Shortcuts::scalar] = Qinside[Shortcuts::scalar];
4 Qoutside[Shortcuts::rho] = Qinside[Shortcuts::rho];
5 Qoutside[Shortcuts::rhoU] = -Qinside[Shortcuts::rhoU];
6 Qoutside[Shortcuts::rhoV] = -Qinside[Shortcuts::rhoV];
7#if DIMENSIONS == 3
8 Qoutside[Shortcuts::rhoW] = -Qinside[Shortcuts::rhoW];
9#endif
10"""

Definition at line 144 of file fv-coupling.py.

◆ advection_flux

str fv-coupling.advection_flux
Initial value:
1= """
2 const auto irho = 1.0 / Q[Shortcuts::rho];
3 const auto u_n = Q[Shortcuts::rhoU + normal] * irho;
4 F[Shortcuts::scalar] = Q[Shortcuts::scalar] * u_n;
5"""

Definition at line 155 of file fv-coupling.py.

◆ advection_initial_conditions

str fv-coupling.advection_initial_conditions
Initial value:
1= """
2 Q[Shortcuts::scalar] = ((x(0) < 0.5) ? (50) : 0.0);
3 Q[Shortcuts::rho] = 0.1;
4 Q[Shortcuts::rhoU] = 0.0;
5 Q[Shortcuts::rhoV] = 0.0;
6#if DIMENSIONS == 3
7 Q[Shortcuts::rhoW] = 0.0;
8#endif
9"""

Definition at line 134 of file fv-coupling.py.

◆ advection_max_eigenvalue

str fv-coupling.advection_max_eigenvalue
Initial value:
1= """
2 if (dt == 0) {
3 // Return dummy value initially because all velocities are 0
4 return 1.0;
5 }
6 // We could also return a dummy value here but this way, mistakes are more obvious.
7 const auto irho = 1.0 / Q[Shortcuts::rho];
8 const auto u_n = Q[Shortcuts::rhoU + normal] * irho;
9 return u_n;
10"""

Definition at line 161 of file fv-coupling.py.

◆ advection_solver

fv-coupling.advection_solver
Initial value:
1= exahype2.solvers.fv.godunov.GlobalAdaptiveTimeStep(
2 name="AdvectionFVSolver",
3 patch_size=args.degrees_of_freedom,
4 unknowns=advection_unknowns,
5 auxiliary_variables=advection_auxiliary_variables,
6 min_volume_h=min_h,
7 max_volume_h=max_h,
8 time_step_relaxation=0.5,
9 solvers_before_in_coupling=[euler_solver],
10)

Definition at line 172 of file fv-coupling.py.

◆ advection_unknowns

dict fv-coupling.advection_unknowns = {"scalar": 1}

ADVECTION #.

Definition at line 125 of file fv-coupling.py.

◆ args

fv-coupling.args = parser.parse_args()

Definition at line 17 of file fv-coupling.py.

◆ boundary_conditions

fv-coupling.boundary_conditions

Definition at line 116 of file fv-coupling.py.

◆ compute_primitive_variables

str fv-coupling.compute_primitive_variables
Initial value:
1= r"""
2 const auto irho = 1.0 / Q[Shortcuts::rho];
3 const auto u0 = Q[Shortcuts::rhoU + 0] * irho;
4 const auto u1 = Q[Shortcuts::rhoU + 1] * irho;
5#if DIMENSIONS == 3
6 const auto u2 = Q[Shortcuts::rhoU + 2] * irho;
7#endif
8
9#if DIMENSIONS == 3
10 const auto uSq = u0 * u0 + u1 * u1 + u2 * u2;
11 const auto u_n = (normal == 0) ? u0 : (normal == 1) ? u1 : u2;
12#else
13 const auto uSq = u0 * u0 + u1 * u1;
14 const auto u_n = (normal == 0) ? u0 : u1;
15#endif
16
17 const auto internalE = Q[Shortcuts::rhoE] - 0.5 * Q[Shortcuts::rho] * uSq;
18 const auto p = (GAMMA - 1.0) * internalE;
19"""

Definition at line 56 of file fv-coupling.py.

◆ degrees_of_freedom

fv-coupling.degrees_of_freedom

Definition at line 10 of file fv-coupling.py.

◆ dimensions

fv-coupling.dimensions

Definition at line 288 of file fv-coupling.py.

◆ end_time

fv-coupling.end_time

Definition at line 11 of file fv-coupling.py.

◆ euler_boundary_conditions

str fv-coupling.euler_boundary_conditions
Initial value:
1= """
2 // Reflective boundary conditions
3 Qoutside[Shortcuts::rho] = Qinside[Shortcuts::rho];
4 Qoutside[Shortcuts::rhoU] = -Qinside[Shortcuts::rhoU];
5 Qoutside[Shortcuts::rhoV] = -Qinside[Shortcuts::rhoV];
6#if DIMENSIONS == 3
7 Qoutside[Shortcuts::rhoW] = -Qinside[Shortcuts::rhoW];
8#endif
9 Qoutside[Shortcuts::rhoE] = Qinside[Shortcuts::rhoE];
10"""

Definition at line 45 of file fv-coupling.py.

◆ euler_flux

str fv-coupling.euler_flux
Initial value:
1= r"""
2 {compute_primitive_variables}
3
4 F[Shortcuts::rho] = Q[Shortcuts::rhoU + normal];
5
6 F[Shortcuts::rhoU + 0] = Q[Shortcuts::rhoU + 0] * u_n;
7 F[Shortcuts::rhoU + 1] = Q[Shortcuts::rhoU + 1] * u_n;
8#if DIMENSIONS == 3
9 F[Shortcuts::rhoU + 2] = Q[Shortcuts::rhoU + 2] * u_n;
10#endif
11
12 F[Shortcuts::rhoU + normal] += p;
13
14 F[Shortcuts::rhoE] = (Q[Shortcuts::rhoE] + p) * u_n;
15""".format(
16 compute_primitive_variables=compute_primitive_variables
17)

Definition at line 86 of file fv-coupling.py.

◆ euler_initial_conditions

str fv-coupling.euler_initial_conditions
Initial value:
1= """
2 Q[Shortcuts::rho] = 0.1;
3 Q[Shortcuts::rhoU] = 0.0;
4 Q[Shortcuts::rhoV] = 0.0;
5#if DIMENSIONS == 3
6 Q[Shortcuts::rhoW] = 0.0;
7#endif
8 Q[Shortcuts::rhoE] = ((x(0) < 0.5) ? (1.01) : (1.0));
9"""

Definition at line 35 of file fv-coupling.py.

◆ euler_max_eigenvalue

str fv-coupling.euler_max_eigenvalue
Initial value:
1= r"""
2 {compute_primitive_variables}
3 const auto speedOfSound = std::sqrt(GAMMA * p * irho);
4 auto result = std::fmax(0.0, std::fabs(u_n - speedOfSound));
5 result = std::fmax(result, std::fabs(u_n + speedOfSound));
6 return result;
7""".format(
8 compute_primitive_variables=compute_primitive_variables
9)

Definition at line 76 of file fv-coupling.py.

◆ euler_solver

fv-coupling.euler_solver
Initial value:
1= exahype2.solvers.fv.godunov.GlobalAdaptiveTimeStep(
2 name="EulerFVSolver",
3 patch_size=args.degrees_of_freedom,
4 unknowns=euler_unknowns,
5 auxiliary_variables=0,
6 min_volume_h=min_h,
7 max_volume_h=max_h,
8 time_step_relaxation=0.5,
9)

Definition at line 104 of file fv-coupling.py.

◆ euler_unknowns

dict fv-coupling.euler_unknowns
Initial value:
1= {
2 "rho": 1,
3 "rhoU": 1,
4 "rhoV": 1,
5}

EULER #.

Definition at line 26 of file fv-coupling.py.

◆ first_plot_time_stamp

fv-coupling.first_plot_time_stamp

Definition at line 293 of file fv-coupling.py.

◆ flux

fv-coupling.flux

Definition at line 117 of file fv-coupling.py.

◆ initial_conditions

fv-coupling.initial_conditions

Definition at line 115 of file fv-coupling.py.

◆ last_solver

fv-coupling.last_solver

Definition at line 265 of file fv-coupling.py.

◆ make

fv-coupling.make

Definition at line 309 of file fv-coupling.py.

◆ make_clean_first

fv-coupling.make_clean_first

Definition at line 309 of file fv-coupling.py.

◆ max_eigenvalue

fv-coupling.max_eigenvalue

Definition at line 118 of file fv-coupling.py.

◆ max_end_time

fv-coupling.max_end_time

Definition at line 292 of file fv-coupling.py.

◆ max_h

float fv-coupling.max_h = 1.1 / 3.0**args.min_depth

Definition at line 19 of file fv-coupling.py.

◆ min_depth

fv-coupling.min_depth

Definition at line 9 of file fv-coupling.py.

◆ min_end_time

fv-coupling.min_end_time

Definition at line 291 of file fv-coupling.py.

◆ min_h

float fv-coupling.min_h = max_h * 3.0 ** (-args.amr_levels)

Definition at line 20 of file fv-coupling.py.

◆ mode

fv-coupling.mode

Definition at line 304 of file fv-coupling.py.

◆ number_of_snapshots

fv-coupling.number_of_snapshots

Definition at line 12 of file fv-coupling.py.

◆ number_of_variables_advection

tuple fv-coupling.number_of_variables_advection
Initial value:
1= (
2 advection_solver.auxiliary_variables + advection_solver.unknowns
3)

Definition at line 203 of file fv-coupling.py.

◆ number_of_variables_euler

fv-coupling.number_of_variables_euler = euler_solver.auxiliary_variables + euler_solver.unknowns

Definition at line 202 of file fv-coupling.py.

◆ offset

fv-coupling.offset

Definition at line 290 of file fv-coupling.py.

◆ parser

fv-coupling.parser = exahype2.ArgumentParser("ExaHyPE 2 - Finite Volumes Coupling Testing Script")

Definition at line 6 of file fv-coupling.py.

◆ periodic_BC

fv-coupling.periodic_BC

Definition at line 295 of file fv-coupling.py.

◆ periodic_boundary_conditions_x

fv-coupling.periodic_boundary_conditions_x

Definition at line 13 of file fv-coupling.py.

◆ periodic_boundary_conditions_y

fv-coupling.periodic_boundary_conditions_y

Definition at line 14 of file fv-coupling.py.

◆ periodic_boundary_conditions_z

fv-coupling.periodic_boundary_conditions_z

Definition at line 15 of file fv-coupling.py.

◆ project

fv-coupling.project
Initial value:
1= exahype2.Project(
2 namespace=["tests", "exahype2", "fv"],
3 project_name=".",
4 directory=".",
5 executable="ExaHyPE",
6)

PROJECT #.

Definition at line 271 of file fv-coupling.py.

◆ size

fv-coupling.size

Definition at line 289 of file fv-coupling.py.

◆ throw_away_data_after_build

fv-coupling.throw_away_data_after_build

Definition at line 309 of file fv-coupling.py.

◆ time_in_between_plots

fv-coupling.time_in_between_plots = 0.0

Definition at line 282 of file fv-coupling.py.

◆ True

fv-coupling.True

Definition at line 309 of file fv-coupling.py.