78 REAL,
PARAMETER :: gn = 1.0
81 INTEGER,
PARAMETER :: shearsheet_direction = 1
83 REAL,
PARAMETER ::
omega = 1.0
84 REAL,
PARAMETER :: sigma0 = 1.0
85 REAL,
PARAMETER :: delsigma = sigma0*5.0e-4
86 REAL,
PARAMETER :: tsim = 10.0/
omega 87 REAL,
PARAMETER :: gamma = 2.0
88 REAL,
PARAMETER :: q = 1.5
93 REAL,
PARAMETER :: soundspeed = pi*gn*sigma0/
omega 95 INTEGER,
PARAMETER :: mgeo = cartesian
96 INTEGER,
PARAMETER :: xres = 30
97 INTEGER,
PARAMETER :: yres = 30
98 INTEGER,
PARAMETER :: zres = 30
99 REAL :: domainx = 40.0
100 REAL :: domainy = 40.0
101 REAL :: domainz = 40.0
104 INTEGER,
PARAMETER :: onum = 10
106 CHARACTER(LEN=256),
PARAMETER :: odir =
"./" 107 CHARACTER(LEN=256),
PARAMETER :: ofname =
"sblintheo" 109 CLASS(
fosite),
ALLOCATABLE :: sim
116 CALL sim%InitFosite()
119 CALL initdata(sim%Mesh, sim%Physics, sim%Timedisc%pvar, sim%Timedisc%cvar)
138 TYPE(Dict_TYP),
POINTER :: config
140 TYPE(Dict_TYP),
POINTER :: mesh,physics,fluxes,&
141 grav,sources,timedisc,shearingbox,&
143 REAL :: XMIN,XMAX,YMIN,YMAX,ZMIN,ZMAX
156 "problem" / euler_isotherm, &
160 "units" / geometrical &
165 "meshtype" / midpoint, &
167 "shear_dir" / shearsheet_direction, &
178 "decomposition"/ (/ 1, -1, 1/), &
179 "output/rotation" / 0, &
180 "output/volume" / 0, &
190 "variables" / primitive, &
191 "limiter" / vanleer &
197 "self/gtype" / sboxspectral, &
199 "self/output/phi" / 0, &
200 "self/output/accel_x" / 0, &
201 "self/output/accel_y" / 0 &
205 shearingbox => dict(&
212 "shearing" / shearingbox &
217 "method" / dormand_prince, &
220 "dtlimit" / 1.0e-40, &
222 "maxiter" / 100000000)
226 "fileformat" / vtk, &
227 "filename" / (trim(odir) // trim(ofname)), &
233 "physics" / physics, &
235 "sources" / sources, &
236 "timedisc" / timedisc, &
237 "datafile" / datafile &
242 SUBROUTINE initdata(Mesh,Physics,pvar,cvar)
245 CLASS(mesh_base),
INTENT(IN) :: Mesh
246 CLASS(physics_base),
INTENT(IN) :: Physics
247 CLASS(marray_compound),
POINTER,
INTENT(INOUT) :: pvar,cvar
254 kx = -2*(2*pi/domainx)
259 SELECT TYPE(p => pvar)
260 TYPE IS(statevector_eulerisotherm)
261 IF(mesh%shear_dir.EQ.2)
THEN 262 p%density%data3d(:,:,:) = sigma0 &
263 + delsigma*cos(kx*mesh%bcenter(:,:,:,1) &
264 + ky*mesh%bcenter(:,:,:,2) &
265 + kz*mesh%bcenter(:,:,:,3))
266 p%velocity%data2d(:,1) = 0.0
267 p%velocity%data4d(:,:,:,2) = -q*
omega*mesh%bcenter(:,:,:,1)
268 p%velocity%data2d(:,3) = 0.0
269 ELSE IF(mesh%shear_dir.EQ.1)
THEN 270 p%density%data3d(:,:,:) = sigma0 &
271 + delsigma*cos(kx*mesh%bcenter(:,:,:,2) &
272 - ky*mesh%bcenter(:,:,:,1) &
273 + kz*mesh%bcenter(:,:,:,3))
274 p%velocity%data4d(:,:,:,1) = q*
omega*mesh%bcenter(:,:,:,2)
275 p%velocity%data2d(:,2) = 0.0
276 p%velocity%data2d(:,3) = 0.0
278 TYPE IS(statevector_euler)
279 IF(mesh%shear_dir.EQ.2)
THEN 280 p%density%data3d(:,:,:) = sigma0 &
281 + delsigma*cos(kx*mesh%bcenter(:,:,:,1) &
282 + ky*mesh%bcenter(:,:,:,2) &
283 + kz*mesh%bcenter(:,:,:,3))
284 p%velocity%data2d(:,1) = 0.0
285 p%velocity%data4d(:,:,:,2) = -q*
omega*mesh%bcenter(:,:,:,1)
286 p%velocity%data2d(:,3) = 0.0
287 ELSE IF(mesh%shear_dir.EQ.1)
THEN 288 p%density%data3d(:,:,:) = sigma0 &
289 + delsigma*cos(kx*mesh%bcenter(:,:,:,2) &
290 - ky*mesh%bcenter(:,:,:,1) &
291 + kz*mesh%bcenter(:,:,:,3))
292 p%velocity%data4d(:,:,:,1) = q*
omega*mesh%bcenter(:,:,:,2)
293 p%velocity%data2d(:,2) = 0.0
294 p%velocity%data2d(:,3) = 0.0
297 CALL physics%Error(
"shear::InitData",
"only (non-)isothermal HD supported")
300 CALL physics%Convert2Conservative(pvar,cvar)
301 CALL mesh%Info(
" DATA-----> initial condition: " // &
302 "Linear Theory Test - Shearingsheet")
pure real function, dimension(size(ephir%data2d, dim=1)) omega(ephir, velocity)
subroutine initdata(Mesh, Physics, Fluxes, Timedisc)
subroutine makeconfig(Sim, config)