• R/O
  • SSH

ateles: Commit

Adaptive Tree based Efficient and Lithe Equation Solver | DG solver of APES; Now found at https://github.com/apes-suite/ateles


Commit MetaInfo

Revisión668f7db930955bf992b26dadd73de2de316614d0 (tree)
Tiempo2022-06-22 19:54:27
AutorHarald Klimach <harald.klimach@dlr....>
CommiterHarald Klimach

Log Message

Added acoustic/planar_wave_3D example

Cambiar Resumen

Diferencia incremental

diff -r a580026a6156 -r 668f7db93095 examples/acoustic/planar_wave_3D/ateles_recheck.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/acoustic/planar_wave_3D/ateles_recheck.lua Wed Jun 22 12:54:27 2022 +0200
@@ -0,0 +1,168 @@
1+-- Configuration file for Ateles (Periodic Oscillator) --
2+
3+-- This is a configuration file for the Finite Volume / Discontinuous Galerkin
4+-- Solver ATELES.
5+-- It provides a testcase for the simulation of Acoustic equations in a
6+-- homogenous media. The simulation domain is a periodic cube with edge length
7+-- 2.0. Therefore this is a very good way to verify your algorithmic
8+-- implementations, since this testcase does not involve any boundary
9+-- conditions.
10+-- The testcase simulates the temporal development of standing waves for
11+-- acoustic equation. Since we are considering a very simple domain, an
12+-- analytic solution is well known and given as Lua functions in this script.
13+-- Therefore we suggest this testcase to verify one of the following topics
14+-- ... algorihtmic correctness
15+-- ... spatial and temporal order of your scheme
16+-- ... diffusion and dispersion relations of your scheme
17+-- ... and many more.
18+-- To verify diffusion and dispersion relations this testcases allows you to
19+-- modify the spatial harmonics by varying the integer mode number in x and y
20+-- direction by modifying the lua variables m and n.
21+-- This testcase can be run in serial (only one execution unit) or in parallel
22+-- (with multiple mpi ranks).
23+-- To calculate a grid convergence behavior please modify the level variable.
24+-- An increment of one will half the radius of your elements.
25+
26+--------------------------------------------------------------------------------
27+--------------------------------------------------------------------------------
28+-- Parameters to vary --
29+degree = 7
30+poly_space = 'Q'
31+
32+
33+-- Check for Nans and unphysical values
34+check = {
35+ interval = 100,
36+ }
37+
38+
39+-- ...the general projection table
40+projection = {
41+ kind = 'fpt', -- 'fpt' or 'l2p', default 'l2p'
42+ -- for fpt the nodes are automatically 'chebyshev'
43+ -- for lep the nodes are automatically 'gauss-legendre'
44+ -- lobattopoints = false -- if lobatto points should be used, default = false,
45+ -- only working for chebyshev points --> fpt
46+ factor = 1.0, -- dealising factpr for fpt, oversampling factor for l2p, float, default 1.0
47+ -- blocksize = 32, -- for fpt, default -1
48+ -- fftmultithread = false -- for fpt, logical, default false
49+ }
50+
51+--...Configuration of simulation time
52+simulation_name = 'plane_wave_XQ8' -- the name of the simualtion
53+timing_file = 'timing.res' -- the filename of the timing results
54+sim_control = {
55+ time_control = { max = 0.01*1, -- final Simulated time
56+ min = 0,
57+ interval = {iter = 100}
58+ }
59+ }
60+
61+-- End Parameters to vary --
62+--------------------------------------------------------------------------------
63+-- Definition of the test-case.
64+
65+-- Mesh definitions --
66+-- ...the uniform refinement level for the periodic cube
67+level = 2
68+-- ...the length of the cube
69+cubeLength = 2.0
70+mesh = { predefined = 'cube',
71+ origin = {
72+ (-1.0)*cubeLength/2.0,
73+ (-1.0)*cubeLength/2.0,
74+ (-1.0)*cubeLength/2.0
75+ },
76+ length = cubeLength,
77+ refinementLevel = level
78+ }
79+
80+-- Tracking
81+eps=cubeLength/(2^(level+1))
82+tracking = {
83+ label = 'track_line_density_m7',
84+ folder = './',
85+ variable = {'density'},
86+ shape = {kind = 'canoND', object= { origin = {0.0+eps,0.0,0.0},
87+ }
88+ },
89+ time_control= { min = 0,
90+ -- max = sim_control.time_control.max,
91+ interval = sim_control.time_control.max/8.0,
92+ },
93+ output = { format = 'ascii', ndofs = 1 },
94+ }
95+
96+
97+-- Equation definitions --
98+equation = {
99+ name = 'acoustic',
100+ background = {
101+ density = 1.225,
102+ velocityX = 0.0,
103+ velocityY = 0.0,
104+ velocityZ = 0.0,
105+ pressure = 100000.0
106+ }
107+ }
108+
109+-- Scheme definitions --
110+scheme = {
111+ -- the spatial discretization scheme
112+ spatial = {
113+ name = 'modg', -- we use the modal discontinuous Galerkin scheme
114+ m = degree, -- the maximal polynomial degree for each spatial direction
115+ modg_space = poly_space
116+ },
117+ -- the temporal discretization scheme
118+ temporal = {
119+ name = 'explicitRungeKutta',
120+ steps = 4,
121+ -- how to control the timestep
122+ control = {
123+ name = 'cfl', -- the name of the timestep control mechanism
124+ cfl = 0.95, -- CourantÐFriedrichsÐLewy number
125+ },
126+ },
127+ }
128+
129+
130+c = math.sqrt(equation.background.pressure / equation.background.density)
131+ampl_density= (equation.background.density/c)
132+ampl_X= ampl_density /equation.background.density * ( equation.background.velocityX - c)
133+ampl_Y = 1.0--0.001225
134+ampl_Z = 1.0 --0.001225
135+
136+function velocityX(x,y,z,t)
137+ return ( (ampl_X * math.cos(math.pi*x-c*t)) )
138+end
139+function velocityY(x,y,z,t)
140+ return ( (ampl_Y * math.cos(math.pi*y-c*t)) )
141+end
142+function velocityZ(x,y,z,t)
143+ return ( (ampl_Z * math.cos(math.pi*z-c*t)) )
144+end
145+function density(x,y,z,t)
146+ return ( ampl_density * math.cos(math.pi*x-c*t) )
147+end
148+
149+function init_velocityX(x,y,z)
150+ return (velocityX(x,y,z,0.0) )
151+end
152+function init_velocityY(x,y,z)
153+ return (velocityY(x,y,z,0.0) )
154+end
155+function init_velocityZ(x,y,z)
156+ return (velocityZ(x,y,z,0.0) )
157+end
158+function init_density(x,y,z)
159+ return ( density(x,y,z,0.0) )
160+end
161+
162+-- Initial Condition definitions --
163+initial_condition = {
164+ density = init_density,
165+ velocityX = init_velocityX,
166+ velocityY = 0.0,
167+ velocityZ = 0.0,
168+ }
diff -r a580026a6156 -r 668f7db93095 examples/acoustic/planar_wave_3D/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/acoustic/planar_wave_3D/index.md Wed Jun 22 12:54:27 2022 +0200
@@ -0,0 +1,20 @@
1+title: Planar Wave
2+
3+Test case description: This setup investigates the acoustic behaviour, solving the Acoustic equations.
4+In this testcase cosinus waves in x directions is prescribed at initial condition. The simulation
5+domain is defined as a cube with periodic boundaries.
6+
7+**Features used**
8+
9+1. Projection: fpt
10+
11+2. Polynomial representation: Q
12+
13+3. Filtering: --
14+
15+4. Timestepping: explicitRungeKutta, 4 steps
16+
17+5. Boundary conditions: slipwall
18+
19+6. Others:
20+ - Derived quantity: Momentum
diff -r a580026a6156 -r 668f7db93095 examples/acoustic/planar_wave_3D/ref_plane_wave_XQ8_track_line_density_m7_p00000.res
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/acoustic/planar_wave_3D/ref_plane_wave_XQ8_track_line_density_m7_p00000.res Wed Jun 22 12:54:27 2022 +0200
@@ -0,0 +1,11 @@
1+# Rank of the process: 0
2+# time density
3+ 0.0000000000000000E+000 0.2729507275347516E-002
4+ 0.1259863281250001E-002 -0.1307118634434623E-002
5+ 0.2506738281250009E-002 -0.3838378522508043E-002
6+ 0.3753613281250017E-002 -0.2043089078259357E-002
7+ 0.5000488281250026E-002 0.2055132615788942E-002
8+ 0.6260351562500034E-002 0.3831653394886250E-002
9+ 0.7507226562500043E-002 0.1251251934977904E-002
10+ 0.8754101562499988E-002 -0.2739537579471550E-002
11+ 0.1000000000000000E-001 -0.3643489903796268E-002
Show on old repository browser