Peano
Loading...
Searching...
No Matches
sedov 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", "sedov1D"]
 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 = [1, 1, 1]
 
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 = "bucket-sort"
 
str kernel_optimisation = "no-optimisation"
 
 ICs = exaparty.api.scenario.SedovBlastIC()
 Initialisation snippet for the particle.
 
 initialisation_snippet = ICs.initialisation_snippet
 
float coords = np.ones((args.particle_number, 2)) * 0.5
 
 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

sedov.action

Definition at line 30 of file sedov.py.

◆ Always

sedov.Always

Definition at line 432 of file sedov.py.

◆ args

sedov.args = parser.parse_args()

Definition at line 138 of file sedov.py.

◆ build_mode

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

Definition at line 253 of file sedov.py.

◆ cellsize

list sedov.cellsize = domain_size[0]

Definition at line 213 of file sedov.py.

◆ CFL_CONSTANT

sedov.CFL_CONSTANT = args.cfl_factor

Definition at line 191 of file sedov.py.

◆ choices

sedov.choices

Definition at line 126 of file sedov.py.

◆ coords

float sedov.coords = np.ones((args.particle_number, 2)) * 0.5

Definition at line 310 of file sedov.py.

◆ default

sedov.default

Definition at line 23 of file sedov.py.

◆ depth

int sedov.depth = 0

Definition at line 212 of file sedov.py.

◆ dest

sedov.dest

Definition at line 21 of file sedov.py.

◆ dimensions

int sedov.dimensions = 2

Definition at line 157 of file sedov.py.

◆ dirs

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

Cleanup and compilation.

Definition at line 425 of file sedov.py.

◆ domain_size

list sedov.domain_size = [1, 1, 1]

Definition at line 180 of file sedov.py.

◆ dx

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

Definition at line 220 of file sedov.py.

◆ first_plot_time_stamp

sedov.first_plot_time_stamp

Definition at line 266 of file sedov.py.

◆ GAMMA

list sedov.GAMMA = gamma_hydro_list[0]

Definition at line 201 of file sedov.py.

◆ gamma_hydro_list

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

Definition at line 194 of file sedov.py.

◆ gamma_hydro_list_symbols

list sedov.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 sedov.py.

◆ GAMMA_HYDRO_SYMBOL

list sedov.GAMMA_HYDRO_SYMBOL = gamma_hydro_list_symbols[0]

Definition at line 202 of file sedov.py.

◆ GLOBAL_TIME_STEP_SIZE

sedov.GLOBAL_TIME_STEP_SIZE = args.timestep_size

Definition at line 190 of file sedov.py.

◆ h_hydro_max

sedov.h_hydro_max

Definition at line 228 of file sedov.py.

◆ help

sedov.help

Definition at line 24 of file sedov.py.

◆ hydro_dimensions

int sedov.hydro_dimensions = 1

Definition at line 158 of file sedov.py.

◆ HYDRO_DIMENSIONS

int sedov.HYDRO_DIMENSIONS = hydro_dimensions

Definition at line 184 of file sedov.py.

◆ hydro_H_max

float sedov.hydro_H_max = 0.499 * cellsize

Definition at line 221 of file sedov.py.

◆ hydro_h_max

sedov.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 sedov.py.

◆ HYDRO_PART_NUMBER

sedov.HYDRO_PART_NUMBER = args.particle_number

Definition at line 187 of file sedov.py.

◆ ICs

Initialisation snippet for the particle.

Definition at line 307 of file sedov.py.

◆ initialisation_snippet

sedov.initialisation_snippet = ICs.initialisation_snippet

Definition at line 308 of file sedov.py.

◆ kernel

sedov.kernel = args.kernel

Definition at line 206 of file sedov.py.

◆ kernel_optimisation

str sedov.kernel_optimisation = "no-optimisation"

Definition at line 281 of file sedov.py.

◆ KERNEL_SUPPORT_RAD

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

Definition at line 208 of file sedov.py.

◆ KERNEL_SYMBOL

sedov.KERNEL_SYMBOL = sphtools.sph_kernel_macro_name[kernel]

Definition at line 207 of file sedov.py.

◆ make_clean_first

sedov.make_clean_first

Definition at line 434 of file sedov.py.

◆ max_end_time

sedov.max_end_time

Definition at line 265 of file sedov.py.

◆ min_end_time

sedov.min_end_time

Definition at line 264 of file sedov.py.

◆ name

str sedov.name = "HydroPart"

Definition at line 155 of file sedov.py.

◆ number_of_parallel_builds

sedov.number_of_parallel_builds

Definition at line 434 of file sedov.py.

◆ offset

list sedov.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 sedov.py.

◆ output_files

list sedov.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 437 of file sedov.py.

◆ overwrite

sedov.overwrite

Definition at line 432 of file sedov.py.

◆ parallelisation

str sedov.parallelisation = "domain-decomposition"

Definition at line 273 of file sedov.py.

◆ parser

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

Parse user input.

Definition at line 17 of file sedov.py.

◆ particle

sedov.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 sedov.py.

◆ particle_plotter

sedov.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 351 of file sedov.py.

◆ particle_set

sedov.particle_set = project.add_particle_species(particle)

Definition at line 250 of file sedov.py.

◆ peano4_project

sedov.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 383 of file sedov.py.

◆ periodic_BC

sedov.periodic_BC

Definition at line 268 of file sedov.py.

◆ periodic_boundary_conditions

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

Definition at line 181 of file sedov.py.

◆ plotter_precision

sedov.plotter_precision

Definition at line 269 of file sedov.py.

◆ project

sedov.project
Initial value:
2 namespace=project_namespace, project_name="Sedov1D", executable="sedov1D"
3)
ExaParty project.
Definition Project.py:27

Definition at line 147 of file sedov.py.

◆ project_namespace

list sedov.project_namespace = ["tests", "exaparty", "sedov1D"]

Generate ExaParty project.

Definition at line 145 of file sedov.py.

◆ required

sedov.required

Definition at line 45 of file sedov.py.

◆ sorting

str sedov.sorting = "bucket-sort"

Definition at line 280 of file sedov.py.

◆ storage

str sedov.storage = "scattered"

Definition at line 276 of file sedov.py.

◆ throw_away_data_after_generation

sedov.throw_away_data_after_generation

Definition at line 432 of file sedov.py.

◆ time_in_between_plots

sedov.time_in_between_plots

Definition at line 267 of file sedov.py.

◆ True

sedov.True

Definition at line 434 of file sedov.py.

◆ type

sedov.type

Definition at line 22 of file sedov.py.