57 west, east, south, north, bottom, top
66 CLASS(Boundary_noslip),
INTENT(INOUT) :: this
67 CLASS(Mesh_base) ,
INTENT(IN) :: Mesh
68 CLASS(Physics_base) ,
INTENT(IN) :: Physics
69 TYPE(Dict_TYP),
POINTER,
INTENT(IN) :: config
70 INTEGER ,
INTENT(IN) :: dir
74 CALL this%InitBoundary(mesh,physics,noslip,
boundcond_name,dir,config)
79 ALLOCATE(this%data(mesh%GINUM,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%VNUM), &
81 this%data(:,:,:,:)=0.0
83 ALLOCATE(this%data(mesh%IMIN:mesh%IMAX,mesh%GJNUM,mesh%KMIN:mesh%KMAX,physics%VNUM), &
85 this%data(:,:,:,:)=0.0
87 ALLOCATE(this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%GKNUM, physics%VNUM), &
89 this%data(:,:,:,:)=0.0
93 CALL this%Error(
"InitBoundary_noslip",
"Unable to allocate memory.")
104 REAL ,
INTENT(IN) :: time
109 SELECT CASE(
this%direction%GetType())
117 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%DENSITY) &
118 = pvar%data4d(mesh%IMIN+i-1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%DENSITY)
120 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%XVELOCITY) &
121 = -pvar%data4d(mesh%IMIN+i-1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%XVELOCITY)
123 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%YVELOCITY) &
124 =
this%data(i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%YVELOCITY)
125 IF (physics%ZVELOCITY.GT.0)
THEN 126 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY) &
127 =
this%data(i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY)
130 IF (physics%PRESSURE.GT.0)
THEN 131 pvar%data4d(mesh%IMIN-i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%PRESSURE) &
132 = pvar%data4d(mesh%IMIN+i-1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%PRESSURE)
139 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%DENSITY) &
140 = pvar%data4d(mesh%IMAX-i+1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%DENSITY)
142 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%XVELOCITY) &
143 = -pvar%data4d(mesh%IMAX-i+1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%XVELOCITY)
145 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%YVELOCITY) &
146 =
this%data(i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%YVELOCITY)
147 IF (physics%ZVELOCITY.GT.0)
THEN 148 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY) &
149 =
this%data(i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY)
152 IF (physics%PRESSURE.GT.0)
THEN 153 pvar%data4d(mesh%IMAX+i,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%PRESSURE) &
154 = pvar%data4d(mesh%IMAX-i+1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,physics%PRESSURE)
161 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,physics%DENSITY) &
162 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN+j-1,mesh%KMIN:mesh%KMAX,physics%DENSITY)
164 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,physics%YVELOCITY) &
165 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN+j-1,mesh%KMIN:mesh%KMAX,physics%YVELOCITY)
167 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,physics%XVELOCITY) &
168 =
this%data(mesh%IMIN:mesh%IMAX,j,mesh%KMIN:mesh%KMAX,physics%XVELOCITY)
169 IF (physics%ZVELOCITY.GT.0)
THEN 170 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY) &
171 =
this%data(mesh%IMIN:mesh%IMAX,j,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY)
174 IF (physics%PRESSURE.GT.0)
THEN 175 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN-j,mesh%KMIN:mesh%KMAX,physics%PRESSURE) &
176 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN+j-1,mesh%KMIN:mesh%KMAX,physics%PRESSURE)
183 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,physics%DENSITY) &
184 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX-j+1,mesh%KMIN:mesh%KMAX,physics%DENSITY)
186 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,physics%YVELOCITY) &
187 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX-j+1,mesh%KMIN:mesh%KMAX,physics%YVELOCITY)
189 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,physics%XVELOCITY) &
190 =
this%data(mesh%IMIN:mesh%IMAX,j,mesh%KMIN:mesh%KMAX,physics%XVELOCITY)
191 IF (physics%ZVELOCITY.GT.0)
THEN 192 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY) &
193 =
this%data(mesh%IMIN:mesh%IMAX,j,mesh%KMIN:mesh%KMAX,physics%ZVELOCITY)
196 IF (physics%PRESSURE.GT.0)
THEN 197 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX+j,mesh%KMIN:mesh%KMAX,physics%PRESSURE) &
198 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMAX-j+1,mesh%KMIN:mesh%KMAX,physics%PRESSURE)
205 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,physics%DENSITY) &
206 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%kMIN+k-1,physics%DENSITY)
208 IF (physics%ZVELOCITY.GT.0)
THEN 209 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,physics%ZVELOCITY) &
210 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN+k-1,physics%ZVELOCITY)
213 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,physics%XVELOCITY) &
214 =
this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k,physics%XVELOCITY)
215 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,physics%YVELOCITY) &
216 =
this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k,physics%YVELOCITY)
218 IF (physics%PRESSURE.GT.0)
THEN 219 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN-k,physics%PRESSURE) &
220 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMIN+k-1,physics%PRESSURE)
227 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,physics%DENSITY) &
228 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX-k+1,physics%DENSITY)
230 IF (physics%ZVELOCITY.GT.0)
THEN 231 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,physics%ZVELOCITY) &
232 = -pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX-k+1,physics%ZVELOCITY)
235 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,physics%XVELOCITY) &
236 =
this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k,physics%XVELOCITY)
237 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,physics%YVELOCITY) &
238 =
this%data(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k,physics%YVELOCITY)
240 IF (physics%PRESSURE.GT.0)
THEN 241 pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX+k,physics%PRESSURE) &
242 = pvar%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,mesh%KMAX-k+1,physics%PRESSURE)
253 CLASS(Boundary_noslip),
INTENT(INOUT) :: this
255 DEALLOCATE(this%data)
256 CALL this%Finalize_base()
subroutine finalize(this)
Destructor for fixed boundary conditions.
type(logging_base), save this
derived class for compound of mesh arrays
Boundary module for noslip conditions (see wikipedia )
character(len=32), parameter boundcond_name
subroutine initboundary_noslip(this, Mesh, Physics, dir, config)
Constructor for noslip boundary conditions.
named integer constants for flavour of state vectors
pure subroutine setboundarydata(this, Mesh, Physics, time, pvar)
Applies the fixed boundary condition.
Dictionary for generic data types.
Boundary module for fixed in/outflow conditions.