39 REAL,
PARAMETER :: tsim = 0.3
40 REAL,
PARAMETER :: gamma = 1.4
41 REAL,
PARAMETER :: csiso = &
46 REAL,
PARAMETER :: rho0 = 1.0
47 REAL,
PARAMETER :: rho1 = 1.0
48 REAL,
PARAMETER :: rwidth = 0.06
49 REAL,
PARAMETER :: p0 = 1.0
50 REAL,
PARAMETER :: p1 = 1.0
51 REAL,
PARAMETER :: pwidth = 0.06
52 REAL,
PARAMETER :: omega0 = 0.0
53 REAL,
PARAMETER :: eta = 0.0
55 REAL,
PARAMETER :: r0 = 0.0
56 REAL,
PARAMETER :: z0 = 0.0
58 INTEGER,
PARAMETER :: mgeo = cartesian
59 INTEGER,
PARAMETER :: xres = 100
60 INTEGER,
PARAMETER :: yres = 100
61 INTEGER,
PARAMETER :: zres = 1
62 REAL,
PARAMETER :: rmax = 1.0
64 REAL,
PARAMETER :: gpar = 0.8
66 INTEGER,
PARAMETER :: onum = 10
67 CHARACTER(LEN=256),
PARAMETER &
69 CHARACTER(LEN=256),
PARAMETER &
72 CLASS(
fosite),
ALLOCATABLE :: sim
82 CALL initdata(sim%Mesh, sim%Physics, sim%Timedisc)
89 tap_check(ok,
"stoptime reached")
99 TYPE(dict_typ),
POINTER :: config
103 TYPE(dict_typ),
POINTER :: mesh, physics, boundary, datafile, sources, &
105 REAL :: x1,x2,y1,y2,z1,z2
120 bc(south) = absorbing
121 bc(north) = absorbing
126 bc(bottom) = no_gradients
127 bc(top) = no_gradients
129 CALL sim%Error(
"InitProgram",
"geometry not supported for this test")
134 "meshtype" / midpoint, &
150 "western" / bc(west), &
151 "eastern" / bc(east), &
152 "southern" / bc(south), &
153 "northern" / bc(north), &
154 "bottomer" / bc(bottom), &
158 IF (csiso.GT.tiny(csiso))
THEN
159 physics => dict(
"problem" / euler_isotherm, &
162 physics => dict(
"problem" / euler, &
171 "variables" / conservative, &
173 "limiter" / vanleer, &
180 "method" / modified_euler, &
185 "dtlimit" / 1.0e-8, &
186 "maxiter" / 10000000)
189 "fileformat" / xdmf, &
191 "filename" / (trim(odir) // trim(ofname)), &
196 "physics" / physics, &
197 "boundary" / boundary, &
199 "datafile" / datafile, &
200 "timedisc" / timedisc)
202 IF (
ASSOCIATED(sources)) &
203 CALL setattr(config,
"sources", sources)
213 CLASS(physics_base) :: Physics
214 CLASS(mesh_base) :: Mesh
215 CLASS(timedisc_base) :: Timedisc
216 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX) &
218 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX,3) &
221 INTENT(IN) :: mesh,physics
222 INTENT(INOUT) :: timedisc
224 IF (abs(r0).LE.tiny(r0).AND.abs(z0).LE.tiny(z0))
THEN
226 radius(:,:,:) = mesh%radius%bcenter(:,:,:)
227 posvec(:,:,:,:) = mesh%posvec%bcenter(:,:,:,:)
233 CALL mesh%geometry%Convert2Curvilinear(mesh%bcenter,posvec,posvec)
237 posvec(:,:,:,:) = mesh%posvec%bcenter(:,:,:,:) - posvec(:,:,:,:)
239 radius(:,:,:) = sqrt(posvec(:,:,:,1)**2+posvec(:,:,:,2)**2)
243 SELECT TYPE(pvar => timedisc%pvar)
246 pvar%density%data3d(:,:,:) = rho0 + rho1*exp(-log(2.0) &
247 * (radius(:,:,:)/rwidth)**2)
249 pvar%velocity%data1d(:) = 0.0
252 pvar%density%data1d(:) = rho0
254 pvar%pressure%data3d(:,:,:) = p0 + p1*exp(-log(2.0) &
255 * (radius(:,:,:)/rwidth)**2)
257 pvar%velocity%data1d(:) = 0.0
260 CALL physics%Convert2Conservative(timedisc%pvar,timedisc%cvar)
262 CALL mesh%Info(
" DATA-----> initial condition: 2D Gaussian pulse")
subroutine initdata(Mesh, Physics, Fluxes, Timedisc)
subroutine makeconfig(Sim, config)
program gauss2d
2D Gaussian pressure or density pulse with and without rotation
elemental real function, public acosh(x)
inverse hyperbolic cosine function
elemental real function, public gamma(x)
Compute the Gamma function for arguments != 0,-1,-2,..
elemental real function, public asinh(x)
inverse hyperbolic sine function
physics module for 1D,2D and 3D non-isothermal Euler equations
physics module for 1D,2D and 3D isothermal Euler equations