Peano
Loading...
Searching...
No Matches
sod Namespace Reference

Variables

 parser = argparse.ArgumentParser(description="SPH test script")
 Parse user input.
 
 dest
 
 type
 
 default
 
 help
 
 action
 
 required
 
 choices
 
 args = parser.parse_args()
 
list project_namespace = ["tests", "exaparty", "sod"]
 Generate ExaParty project.
 
 project
 
str name = "HydroPart"
 
int dimensions = 2
 
int hydro_dimensions = 1
 
 particle
 
list offset = [0, 0, 0]
 Set parameters for the SPH simulation If no parameters are passed to the exaparty project, it initializes with default values.
 
list domain_size = [2, 2, 2]
 
list periodic_boundary_conditions = [True, False, False]
 
int HYDRO_DIMENSIONS = hydro_dimensions
 
 HYDRO_PART_NUMBER = args.particle_number
 
 GLOBAL_TIME_STEP_SIZE = args.timestep_size
 
 CFL_CONSTANT = args.cfl_factor
 
list gamma_hydro_list = [str(5 / 3), str(7 / 5), str(4 / 3), str(2 / 1)]
 
list gamma_hydro_list_symbols
 
list GAMMA = gamma_hydro_list[0]
 
list GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0]
 
 kernel = args.kernel
 
 KERNEL_SYMBOL = sphtools.sph_kernel_macro_name[kernel]
 
 KERNEL_SUPPORT_RAD = sphtools.sph_kernel_H_over_h[HYDRO_DIMENSIONS - 1][kernel]
 
int depth = 0
 
list cellsize = domain_size[0]
 
list dx = domain_size[0] / args.particle_number
 
float hydro_H_max = 0.499 * cellsize
 
 hydro_h_max
 
 h_hydro_max
 
 particle_set = project.add_particle_species(particle)
 
 build_mode = peano4.api.output.CompileMode.DEBUG
 
 min_end_time
 
 max_end_time
 
 first_plot_time_stamp
 
 time_in_between_plots
 
 periodic_BC
 
 plotter_precision
 
str parallelisation = "domain-decomposition"
 
str storage = "scattered"
 
str sorting = "multiscale-sort"
 
str kernel_optimisation = "no-optimisation"
 
 particle_plotter
 Set up the plotter.
 
 peano4_project = project.generate_Peano4_project(verbose=args.verbose)
 Generate plain Peano 4 project.
 
list dirs = ["vertexdata/", "repositories/", "globaldata/", "observers/"]
 Cleanup and compilation.
 
 overwrite
 
 Always
 
 throw_away_data_after_generation
 
 make_clean_first
 
 True
 
 number_of_parallel_builds
 
list output_files
 

Variable Documentation

◆ action

sod.action

Definition at line 30 of file sod.py.

◆ Always

sod.Always

Definition at line 411 of file sod.py.

◆ args

sod.args = parser.parse_args()

Definition at line 138 of file sod.py.

◆ build_mode

sod.build_mode = peano4.api.output.CompileMode.DEBUG

Definition at line 253 of file sod.py.

◆ cellsize

list sod.cellsize = domain_size[0]

Definition at line 213 of file sod.py.

◆ CFL_CONSTANT

sod.CFL_CONSTANT = args.cfl_factor

Definition at line 191 of file sod.py.

◆ choices

sod.choices

Definition at line 126 of file sod.py.

◆ default

sod.default

Definition at line 23 of file sod.py.

◆ depth

int sod.depth = 0

Definition at line 212 of file sod.py.

◆ dest

sod.dest

Definition at line 21 of file sod.py.

◆ dimensions

sod.dimensions = 2

Definition at line 157 of file sod.py.

◆ dirs

list sod.dirs = ["vertexdata/", "repositories/", "globaldata/", "observers/"]

Cleanup and compilation.

Definition at line 404 of file sod.py.

◆ domain_size

sod.domain_size = [2, 2, 2]

Definition at line 180 of file sod.py.

◆ dx

list sod.dx = domain_size[0] / args.particle_number

Definition at line 220 of file sod.py.

◆ first_plot_time_stamp

sod.first_plot_time_stamp

Definition at line 266 of file sod.py.

◆ GAMMA

list sod.GAMMA = gamma_hydro_list[0]

Definition at line 201 of file sod.py.

◆ gamma_hydro_list

list sod.gamma_hydro_list = [str(5 / 3), str(7 / 5), str(4 / 3), str(2 / 1)]

Definition at line 194 of file sod.py.

◆ gamma_hydro_list_symbols

list sod.gamma_hydro_list_symbols
Initial value:
1= [
2 "HYDRO_GAMMA_5_3",
3 "HYDRO_GAMMA_7_5",
4 "HYDRO_GAMMA_4_3",
5 "HYDRO_GAMMA_2_1",
6]

Definition at line 195 of file sod.py.

◆ GAMMA_HYDRO_SYMBOL

list sod.GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0]

Definition at line 202 of file sod.py.

◆ GLOBAL_TIME_STEP_SIZE

sod.GLOBAL_TIME_STEP_SIZE = args.timestep_size

Definition at line 190 of file sod.py.

◆ h_hydro_max

sod.h_hydro_max

Definition at line 228 of file sod.py.

◆ help

sod.help

Definition at line 24 of file sod.py.

◆ hydro_dimensions

int sod.hydro_dimensions = 1

Definition at line 158 of file sod.py.

◆ HYDRO_DIMENSIONS

int sod.HYDRO_DIMENSIONS = hydro_dimensions

Definition at line 184 of file sod.py.

◆ hydro_H_max

float sod.hydro_H_max = 0.499 * cellsize

Definition at line 221 of file sod.py.

◆ hydro_h_max

sod.hydro_h_max
Initial value:
1= exaparty.api.sphtools.sph_kernel_get_smoothing_length_from_interaction_radius(
2 hydro_H_max, kernel, hydro_dimensions
3)

Definition at line 224 of file sod.py.

◆ HYDRO_PART_NUMBER

sod.HYDRO_PART_NUMBER = args.particle_number

Definition at line 187 of file sod.py.

◆ kernel

sod.kernel = args.kernel

Definition at line 206 of file sod.py.

◆ kernel_optimisation

sod.kernel_optimisation = "no-optimisation"

Definition at line 281 of file sod.py.

◆ KERNEL_SUPPORT_RAD

sod.KERNEL_SUPPORT_RAD = sphtools.sph_kernel_H_over_h[HYDRO_DIMENSIONS - 1][kernel]

Definition at line 208 of file sod.py.

◆ KERNEL_SYMBOL

sod.KERNEL_SYMBOL = sphtools.sph_kernel_macro_name[kernel]

Definition at line 207 of file sod.py.

◆ make_clean_first

sod.make_clean_first

Definition at line 413 of file sod.py.

◆ max_end_time

sod.max_end_time

Definition at line 265 of file sod.py.

◆ min_end_time

sod.min_end_time

Definition at line 264 of file sod.py.

◆ name

str sod.name = "HydroPart"

Definition at line 155 of file sod.py.

◆ number_of_parallel_builds

sod.number_of_parallel_builds

Definition at line 413 of file sod.py.

◆ offset

sod.offset = [0, 0, 0]

Set parameters for the SPH simulation If no parameters are passed to the exaparty project, it initializes with default values.

The values of the parameters can be modified or retrieved using the set/get methods.

Definition at line 179 of file sod.py.

◆ output_files

list sod.output_files
Initial value:
1= [
2 f
3 for f in os.listdir(".")
4 if f.endswith(".peano-patch-file") or f.endswith(".vtu") or f.endswith(".pvd")
5]

Definition at line 416 of file sod.py.

◆ overwrite

sod.overwrite

Definition at line 411 of file sod.py.

◆ parallelisation

sod.parallelisation = "domain-decomposition"

Definition at line 273 of file sod.py.

◆ parser

sod.parser = argparse.ArgumentParser(description="SPH test script")

Parse user input.

Definition at line 17 of file sod.py.

◆ particle

sod.particle
Initial value:
2 name,
3 dimensions_hydro=hydro_dimensions,
4 cfl_factor=args.cfl_factor,
5 initial_time_step_size=args.timestep_size,
6 constant_time_step_size=True,
7 exaparty_project_namespace=project_namespace,
8 min_h=args.cell_size_min,
9 max_h=args.cell_size_max,
10)

Definition at line 160 of file sod.py.

◆ particle_plotter

sod.particle_plotter
Initial value:
2 "particles",
3 particle_set,
4 "globaldata::{}::getSpecies().getMinTimeStamp()".format(particle.name),
5)

Set up the plotter.

A plotter has to be told explicitly which data to visualisation. We visualise the velocity here as scalar attribute. To some degree, this is redundant info as we implicitly have the position of the particle and can "see" its velocity when we play through a movie. But the explicit visualisation shows how to handle attributes per particle.

When we create the plotter, we have to inform it how to enumerate the individual snapshots. Obviously, we can just count through the snapshots. In this case, you have to pass the constant peano4.api.toolbox.particles.PlotParticlesInVTKFormat.CountTimeSteps into the field time_stamp_evaluation. You can also define your own time stamp. For this, it is useful to know that each particle definition in the Python script will yield a particle class with the same name in the subnamespace globaldata. Every particle class in return has a class attribute

       getSpecies()

which returns an object that holds global information about this particle type.

Definition at line 330 of file sod.py.

◆ particle_set

sod.particle_set = project.add_particle_species(particle)

Definition at line 250 of file sod.py.

◆ peano4_project

sod.peano4_project = project.generate_Peano4_project(verbose=args.verbose)

Generate plain Peano 4 project.

The value of some constants such as the adiabatic index cannot be arbitrary but rather we have a set of pre-defined options. The same happens for some functions, e.g. the SPH smoothing kernel. This allows us to define some symbols and fix the values at compile time.

Definition at line 362 of file sod.py.

◆ periodic_BC

sod.periodic_BC

Definition at line 268 of file sod.py.

◆ periodic_boundary_conditions

list sod.periodic_boundary_conditions = [True, False, False]

Definition at line 181 of file sod.py.

◆ plotter_precision

sod.plotter_precision

Definition at line 269 of file sod.py.

◆ project

sod.project
Initial value:
2 namespace=project_namespace, project_name="Sod1D", executable="sod1D"
3)
ExaParty project.
Definition Project.py:27

Definition at line 147 of file sod.py.

◆ project_namespace

list sod.project_namespace = ["tests", "exaparty", "sod"]

Generate ExaParty project.

Definition at line 145 of file sod.py.

◆ required

sod.required

Definition at line 45 of file sod.py.

◆ sorting

sod.sorting = "multiscale-sort"

Definition at line 279 of file sod.py.

◆ storage

sod.storage = "scattered"

Definition at line 276 of file sod.py.

◆ throw_away_data_after_generation

sod.throw_away_data_after_generation

Definition at line 411 of file sod.py.

◆ time_in_between_plots

sod.time_in_between_plots

Definition at line 267 of file sod.py.

◆ True

sod.True

Definition at line 413 of file sod.py.

◆ type

sod.type

Definition at line 22 of file sod.py.