71 INTEGER :: momentum1, momentum2
96 CLASS(sources_shearbox) :: this
97 CLASS(mesh_base),
INTENT(IN) :: Mesh
98 CLASS(physics_base),
INTENT(IN) :: Physics
99 CLASS(fluxes_base),
INTENT(IN) :: Fluxes
100 TYPE(Dict_TYP),
POINTER :: config, IO
104 CALL getattr(config,
"stype",stype)
106 CALL this%InitSources(mesh,fluxes,physics,config,io)
114 CALL this%Error(
"InitSources_shearbox",
"physics not supported")
117 SELECT TYPE(geo=>mesh%Geometry)
121 CALL this%Error(
"InitSources_shearbox",
"mesh not supported")
125 this%accel%data1d(:) = 0.
127 IF(mesh%shear_dir.EQ.2)
THEN 128 this%Vel1=physics%YVELOCITY
129 this%Vel2=physics%XVELOCITY
134 this%MOMENTUM1 = physics%XMOMENTUM
135 this%MOMENTUM2 = physics%YMOMENTUM
136 ELSE IF(mesh%shear_dir.EQ.1)
THEN 137 this%Vel1=physics%XVELOCITY
138 this%Vel2=physics%YVELOCITY
143 this%MOMENTUM1 = physics%YMOMENTUM
144 this%MOMENTUM2 = physics%XMOMENTUM
153 CLASS(sources_shearbox),
INTENT(IN) :: this
154 CLASS(mesh_base),
INTENT(IN) :: Mesh
156 CHARACTER(LEN=32) :: omega_str,q_str
158 WRITE (omega_str,
'(ES8.2)') mesh%OMEGA
159 WRITE (q_str,
'(ES8.2)') mesh%Q
160 CALL this%Info(
" angular velocity: " // trim(omega_str))
161 CALL this%Info(
" shearing parameter:" // trim(q_str))
175 CLASS(sources_shearbox),
INTENT(INOUT) :: this
176 CLASS(mesh_base),
INTENT(IN) :: Mesh
177 CLASS(physics_base),
INTENT(INOUT) :: Physics
178 CLASS(fluxes_base),
INTENT(IN) :: Fluxes
179 CLASS(sources_base),
INTENT(INOUT) :: Sources
180 REAL,
INTENT(IN) :: time, dt
181 CLASS(marray_compound),
INTENT(INOUT) :: pvar,cvar,sterm
183 SELECT CASE(mesh%FARGO)
187 this%accel%data4d(:,:,:,this%I1) = 2*mesh%OMEGA &
188 * (mesh%Q*mesh%OMEGA*mesh%bcenter(:,:,:,this%I1) &
189 + this%SIGN1*pvar%data4d(:,:,:,this%VEL1))
190 this%accel%data4d(:,:,:,this%I2) = 2*mesh%OMEGA*this%SIGN2 &
191 * pvar%data4d(:,:,:,this%VEL2)
193 CALL physics%ExternalSources(this%accel,pvar,cvar,sterm)
196 sterm%data2d(:,physics%DENSITY) = 0.0
198 sterm%data2d(:,this%MOMENTUM1) = pvar%data2d(:,physics%DENSITY) &
199 *mesh%OMEGA*2.0*this%SIGN1*pvar%data2d(:,this%VEL1)
200 sterm%data2d(:,this%MOMENTUM2) = pvar%data2d(:,physics%DENSITY) &
201 *mesh%OMEGA*(2.0-mesh%Q)*this%SIGN2*pvar%data2d(:,this%VEL2)
202 IF (physics%PRESSURE .GT. 0)
THEN 203 sterm%data2d(:,physics%ENERGY) = &
204 this%SIGN1*pvar%data2d(:,physics%DENSITY)*mesh%Q*mesh%OMEGA* &
205 pvar%data2d(:,this%VEL2)*pvar%data2d(:,this%VEL1)
209 CALL this%Error(
"sources_shearbox::ExternalSources_single", &
210 "currently only Fargo transport type 3 is supported")
218 CLASS(sources_shearbox),
INTENT(INOUT) :: this
220 CALL this%accel%Destroy()
subroutine infosources(this, Mesh)
generic source terms module providing functionaly common to all source terms
source terms module for constant acceleration
derived class for compound of mesh arrays
base class for mesh arrays
character(len=32) source_name
physics module for 1D,2D and 3D isothermal Euler equations
Source terms module for fictious forces in a shearingsheet.
subroutine finalize(this)
defines properties of a 3D cartesian mesh
Dictionary for generic data types.
physics module for 1D,2D and 3D non-isothermal Euler equations
base module for numerical flux functions
subroutine externalsources_single(this, Mesh, Physics, Fluxes, Sources, time, dt, pvar, cvar, sterm)
subroutine initsources_shearbox(this, Mesh, Physics, Fluxes, config, IO)
Constructor of sources shearbox module.