105 pressure => null(), &
136 CLASS(physics_euler),
INTENT(INOUT) :: this
137 CLASS(mesh_base),
INTENT(IN) :: Mesh
138 TYPE(Dict_TYP),
POINTER,
INTENT(IN) :: config, IO
140 INTEGER :: err,next_idx
146 this%VNUM = this%VDIM + 2
149 CALL getattr(config,
"gamma", this%gamma, 1.4)
152 ALLOCATE(this%pvarname(this%VNUM),this%cvarname(this%VNUM),this%bccsound, &
156 CALL this%Error(
"InitPhysics_euler",
"Unable to allocate memory.")
162 this%pvarname(this%DENSITY) =
"density" 163 this%cvarname(this%DENSITY) =
"density" 166 IF (this%VDIM.GE.2)
THEN 173 IF (this%VDIM.EQ.3)
THEN 180 this%PRESSURE = this%VNUM
181 this%ENERGY = this%VNUM
182 this%pvarname(this%PRESSURE) =
"pressure" 183 this%cvarname(this%ENERGY) =
"energy" 188 IF (btest(mesh%VECTOR_COMPONENTS,0))
THEN 189 this%pvarname(next_idx) =
"xvelocity" 190 this%cvarname(next_idx) =
"xmomentum" 191 next_idx = next_idx + 1
193 IF (btest(mesh%VECTOR_COMPONENTS,1))
THEN 194 this%pvarname(next_idx) =
"yvelocity" 195 this%cvarname(next_idx) =
"ymomentum" 196 next_idx = next_idx + 1
198 IF (btest(mesh%VECTOR_COMPONENTS,2))
THEN 199 this%pvarname(next_idx) =
"zvelocity" 200 this%cvarname(next_idx) =
"zmomentum" 211 this%supports_absorbing = .true.
213 CALL this%EnableOutput(mesh,config,io)
219 CLASS(physics_euler),
INTENT(INOUT) :: this
221 CALL this%PrintConfiguration()
228 CLASS(physics_euler),
INTENT(IN) :: this
229 CLASS(marray_compound),
POINTER :: new_sv
230 INTEGER,
OPTIONAL,
INTENT(IN) :: flavour,num
233 SELECT TYPE(sv => new_sv)
247 SELECT TYPE(c => cvar)
249 SELECT TYPE(p => pvar)
251 IF (c%flavour.EQ.conservative.AND.p%flavour.EQ.primitive)
THEN 253 SELECT CASE(
this%VDIM)
255 CALL cons2prim(
this%gamma,c%density%data1d(:),c%momentum%data2d(:,1), &
256 c%energy%data1d(:),p%density%data1d(:), &
257 p%velocity%data2d(:,1),p%pressure%data1d(:))
259 CALL cons2prim(
this%gamma,c%density%data1d(:),c%momentum%data2d(:,1), &
260 c%momentum%data2d(:,2),c%energy%data1d(:), &
261 p%density%data1d(:),p%velocity%data2d(:,1), &
262 p%velocity%data2d(:,2),p%pressure%data1d(:))
264 CALL cons2prim(
this%gamma,c%density%data1d(:),c%momentum%data2d(:,1), &
265 c%momentum%data2d(:,2),c%momentum%data2d(:,3), &
266 c%energy%data1d(:),p%density%data1d(:), &
267 p%velocity%data2d(:,1),p%velocity%data2d(:,2),&
268 p%velocity%data2d(:,3),p%pressure%data1d(:))
282 INTEGER,
INTENT(IN) :: i1,i2,j1,j2,k1,k2
285 SELECT TYPE(c => cvar)
287 SELECT TYPE(p => pvar)
289 IF (c%flavour.EQ.conservative.AND.p%flavour.EQ.primitive)
THEN 290 SELECT CASE (c%density%RANK)
293 SELECT CASE(
this%VDIM)
295 CALL cons2prim(
this%gamma,c%density%data3d(i1:i2,j1:j2,k1:k2), &
296 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
297 c%energy%data3d(i1:i2,j1:j2,k1:k2), &
298 p%density%data3d(i1:i2,j1:j2,k1:k2), &
299 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
300 p%pressure%data3d(i1:i2,j1:j2,k1:k2))
302 CALL cons2prim(
this%gamma,c%density%data3d(i1:i2,j1:j2,k1:k2), &
303 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
304 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
305 c%energy%data3d(i1:i2,j1:j2,k1:k2), &
306 p%density%data3d(i1:i2,j1:j2,k1:k2), &
307 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
308 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2), &
309 p%pressure%data3d(i1:i2,j1:j2,k1:k2))
311 CALL cons2prim(
this%gamma,c%density%data3d(i1:i2,j1:j2,k1:k2), &
312 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
313 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
314 c%momentum%data4d(i1:i2,j1:j2,k1:k2,3), &
315 c%energy%data3d(i1:i2,j1:j2,k1:k2), &
316 p%density%data3d(i1:i2,j1:j2,k1:k2), &
317 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
318 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2),&
319 p%velocity%data4d(i1:i2,j1:j2,k1:k2,3), &
320 p%pressure%data3d(i1:i2,j1:j2,k1:k2))
324 SELECT CASE(
this%VDIM)
326 CALL cons2prim(
this%gamma,c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
327 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
328 c%energy%data4d(i1:i2,j1:j2,k1:k2,:), &
329 p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
330 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
331 p%pressure%data4d(i1:i2,j1:j2,k1:k2,:))
333 CALL cons2prim(
this%gamma,c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
334 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
335 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
336 c%energy%data4d(i1:i2,j1:j2,k1:k2,:), &
337 p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
338 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
339 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2), &
340 p%pressure%data4d(i1:i2,j1:j2,k1:k2,:))
342 CALL cons2prim(
this%gamma,c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
343 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
344 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
345 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,3), &
346 c%energy%data4d(i1:i2,j1:j2,k1:k2,:), &
347 p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
348 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
349 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2),&
350 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,3), &
351 p%pressure%data4d(i1:i2,j1:j2,k1:k2,:))
370 SELECT TYPE(p => pvar)
372 SELECT TYPE(c => cvar)
374 IF (p%flavour.EQ.primitive.AND.c%flavour.EQ.conservative)
THEN 376 SELECT CASE(
this%VDIM)
378 CALL prim2cons(
this%gamma,p%density%data1d(:),p%velocity%data2d(:,1), &
379 p%pressure%data1d(:),c%density%data1d(:), &
380 c%momentum%data2d(:,1),c%energy%data1d(:))
382 CALL prim2cons(
this%gamma,p%density%data1d(:),p%velocity%data2d(:,1), &
383 p%velocity%data2d(:,2),p%pressure%data1d(:), &
384 c%density%data1d(:),c%momentum%data2d(:,1), &
385 c%momentum%data2d(:,2),c%energy%data1d(:))
387 CALL prim2cons(
this%gamma,p%density%data1d(:),p%velocity%data2d(:,1), &
388 p%velocity%data2d(:,2),p%velocity%data2d(:,3), &
389 p%pressure%data1d(:),c%density%data1d(:), &
390 c%momentum%data2d(:,1),c%momentum%data2d(:,2), &
391 c%momentum%data2d(:,3),c%energy%data1d(:))
405 INTEGER,
INTENT(IN) :: i1,i2,j1,j2,k1,k2
408 SELECT TYPE(p => pvar)
410 SELECT TYPE(c => cvar)
412 IF (p%flavour.EQ.primitive.AND.c%flavour.EQ.conservative)
THEN 413 SELECT CASE (p%density%RANK)
416 SELECT CASE(
this%VDIM)
418 CALL prim2cons(
this%gamma,p%density%data3d(i1:i2,j1:j2,k1:k2), &
419 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
420 p%pressure%data3d(i1:i2,j1:j2,k1:k2), &
421 c%density%data3d(i1:i2,j1:j2,k1:k2), &
422 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
423 c%energy%data3d(i1:i2,j1:j2,k1:k2))
425 CALL prim2cons(
this%gamma,p%density%data3d(i1:i2,j1:j2,k1:k2), &
426 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
427 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2), &
428 p%pressure%data3d(i1:i2,j1:j2,k1:k2), &
429 c%density%data3d(i1:i2,j1:j2,k1:k2), &
430 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
431 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
432 c%energy%data3d(i1:i2,j1:j2,k1:k2))
434 CALL prim2cons(
this%gamma,p%density%data3d(i1:i2,j1:j2,k1:k2), &
435 p%velocity%data4d(i1:i2,j1:j2,k1:k2,1), &
436 p%velocity%data4d(i1:i2,j1:j2,k1:k2,2), &
437 p%velocity%data4d(i1:i2,j1:j2,k1:k2,3), &
438 p%pressure%data3d(i1:i2,j1:j2,k1:k2), &
439 c%density%data3d(i1:i2,j1:j2,k1:k2), &
440 c%momentum%data4d(i1:i2,j1:j2,k1:k2,1), &
441 c%momentum%data4d(i1:i2,j1:j2,k1:k2,2), &
442 c%momentum%data4d(i1:i2,j1:j2,k1:k2,3), &
443 c%energy%data3d(i1:i2,j1:j2,k1:k2))
447 SELECT CASE(
this%VDIM)
449 CALL prim2cons(
this%gamma,p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
450 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
451 p%pressure%data4d(i1:i2,j1:j2,k1:k2,:), &
452 c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
453 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
454 c%energy%data4d(i1:i2,j1:j2,k1:k2,:))
456 CALL prim2cons(
this%gamma,p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
457 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
458 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2), &
459 p%pressure%data4d(i1:i2,j1:j2,k1:k2,:), &
460 c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
461 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
462 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
463 c%energy%data4d(i1:i2,j1:j2,k1:k2,:))
465 CALL prim2cons(
this%gamma,p%density%data4d(i1:i2,j1:j2,k1:k2,:), &
466 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,1), &
467 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,2), &
468 p%velocity%data5d(i1:i2,j1:j2,k1:k2,:,3), &
469 p%pressure%data4d(i1:i2,j1:j2,k1:k2,:), &
470 c%density%data4d(i1:i2,j1:j2,k1:k2,:), &
471 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,1), &
472 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,2), &
473 c%momentum%data5d(i1:i2,j1:j2,k1:k2,:,3), &
474 c%energy%data4d(i1:i2,j1:j2,k1:k2,:))
488 PURE SUBROUTINE calcfluxesx(this,Mesh,nmin,nmax,prim,cons,xfluxes)
493 INTEGER,
INTENT(IN) :: nmin,nmax
496 SELECT TYPE(p => prim)
498 SELECT TYPE(c => cons)
500 SELECT TYPE(f => xfluxes)
502 SELECT CASE(
this%VDIM)
504 CALL setflux(p%density%data2d(:,nmin:nmax), &
505 p%velocity%data3d(:,nmin:nmax,1), &
506 p%pressure%data2d(:,nmin:nmax), &
507 c%momentum%data3d(:,nmin:nmax,1), &
508 c%energy%data2d(:,nmin:nmax), &
509 f%density%data2d(:,nmin:nmax), &
510 f%momentum%data3d(:,nmin:nmax,1), &
511 f%energy%data2d(:,nmin:nmax))
513 CALL setflux(p%density%data2d(:,nmin:nmax), &
514 p%velocity%data3d(:,nmin:nmax,1), &
515 p%pressure%data2d(:,nmin:nmax), &
516 c%momentum%data3d(:,nmin:nmax,1), &
517 c%momentum%data3d(:,nmin:nmax,2), &
518 c%energy%data2d(:,nmin:nmax), &
519 f%density%data2d(:,nmin:nmax), &
520 f%momentum%data3d(:,nmin:nmax,1), &
521 f%momentum%data3d(:,nmin:nmax,2), &
522 f%energy%data2d(:,nmin:nmax))
524 CALL setflux(p%density%data2d(:,nmin:nmax), &
525 p%velocity%data3d(:,nmin:nmax,1), &
526 p%pressure%data2d(:,nmin:nmax), &
527 c%momentum%data3d(:,nmin:nmax,1), &
528 c%momentum%data3d(:,nmin:nmax,2), &
529 c%momentum%data3d(:,nmin:nmax,3), &
530 c%energy%data2d(:,nmin:nmax), &
531 f%density%data2d(:,nmin:nmax), &
532 f%momentum%data3d(:,nmin:nmax,1), &
533 f%momentum%data3d(:,nmin:nmax,2), &
534 f%momentum%data3d(:,nmin:nmax,3), &
535 f%energy%data2d(:,nmin:nmax))
544 PURE SUBROUTINE calcfluxesy(this,Mesh,nmin,nmax,prim,cons,yfluxes)
549 INTEGER,
INTENT(IN) :: nmin,nmax
552 SELECT TYPE(p => prim)
554 SELECT TYPE(c => cons)
556 SELECT TYPE(f => yfluxes)
558 SELECT CASE(
this%VDIM)
560 CALL setflux(p%density%data2d(:,nmin:nmax), &
561 p%velocity%data3d(:,nmin:nmax,1), &
562 p%pressure%data2d(:,nmin:nmax), &
563 c%momentum%data3d(:,nmin:nmax,1), &
564 c%energy%data2d(:,nmin:nmax), &
565 f%density%data2d(:,nmin:nmax), &
566 f%momentum%data3d(:,nmin:nmax,1), &
567 f%energy%data2d(:,nmin:nmax))
569 CALL setflux(p%density%data2d(:,nmin:nmax), &
570 p%velocity%data3d(:,nmin:nmax,2), &
571 p%pressure%data2d(:,nmin:nmax), &
572 c%momentum%data3d(:,nmin:nmax,2), &
573 c%momentum%data3d(:,nmin:nmax,1), &
574 c%energy%data2d(:,nmin:nmax), &
575 f%density%data2d(:,nmin:nmax), &
576 f%momentum%data3d(:,nmin:nmax,2), &
577 f%momentum%data3d(:,nmin:nmax,1), &
578 f%energy%data2d(:,nmin:nmax))
580 CALL setflux(p%density%data2d(:,nmin:nmax), &
581 p%velocity%data3d(:,nmin:nmax,2), &
582 p%pressure%data2d(:,nmin:nmax), &
583 c%momentum%data3d(:,nmin:nmax,2), &
584 c%momentum%data3d(:,nmin:nmax,1), &
585 c%momentum%data3d(:,nmin:nmax,3), &
586 c%energy%data2d(:,nmin:nmax), &
587 f%density%data2d(:,nmin:nmax), &
588 f%momentum%data3d(:,nmin:nmax,2), &
589 f%momentum%data3d(:,nmin:nmax,1), &
590 f%momentum%data3d(:,nmin:nmax,3), &
591 f%energy%data2d(:,nmin:nmax))
600 PURE SUBROUTINE calcfluxesz(this,Mesh,nmin,nmax,prim,cons,zfluxes)
605 INTEGER,
INTENT(IN) :: nmin,nmax
608 SELECT TYPE(p => prim)
610 SELECT TYPE(c => cons)
612 SELECT TYPE(f => zfluxes)
614 SELECT CASE(
this%VDIM)
616 CALL setflux(p%density%data2d(:,nmin:nmax), &
617 p%velocity%data3d(:,nmin:nmax,1), &
618 p%pressure%data2d(:,nmin:nmax), &
619 c%momentum%data3d(:,nmin:nmax,1), &
620 c%energy%data2d(:,nmin:nmax), &
621 f%density%data2d(:,nmin:nmax), &
622 f%momentum%data3d(:,nmin:nmax,1), &
623 f%energy%data2d(:,nmin:nmax))
625 CALL setflux(p%density%data2d(:,nmin:nmax), &
626 p%velocity%data3d(:,nmin:nmax,2), &
627 p%pressure%data2d(:,nmin:nmax), &
628 c%momentum%data3d(:,nmin:nmax,2), &
629 c%momentum%data3d(:,nmin:nmax,1), &
630 c%energy%data2d(:,nmin:nmax), &
631 f%density%data2d(:,nmin:nmax), &
632 f%momentum%data3d(:,nmin:nmax,2), &
633 f%momentum%data3d(:,nmin:nmax,1), &
634 f%energy%data2d(:,nmin:nmax))
636 CALL setflux(p%density%data2d(:,nmin:nmax), &
637 p%velocity%data3d(:,nmin:nmax,3), &
638 p%pressure%data2d(:,nmin:nmax), &
639 c%momentum%data3d(:,nmin:nmax,3), &
640 c%momentum%data3d(:,nmin:nmax,1), &
641 c%momentum%data3d(:,nmin:nmax,2), &
642 c%energy%data2d(:,nmin:nmax), &
643 f%density%data2d(:,nmin:nmax), &
644 f%momentum%data3d(:,nmin:nmax,3), &
645 f%momentum%data3d(:,nmin:nmax,1), &
646 f%momentum%data3d(:,nmin:nmax,2), &
647 f%energy%data2d(:,nmin:nmax))
744 INTEGER,
INTENT(IN) :: i1,i2
746 REAL,
DIMENSION(Mesh%JMIN:Mesh%JMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
747 INTENT(OUT) :: lambda,xvar
751 SELECT TYPE(p => pvar)
755 SELECT CASE(
this%VDIM)
759 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
760 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
761 p%pressure%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
762 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
763 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
764 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3))
769 p%density%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
770 p%density%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
771 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
772 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
773 p%pressure%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
774 p%pressure%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
775 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
776 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
777 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
778 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
779 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3))
783 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
784 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
785 p%pressure%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
786 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
787 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
788 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
789 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4))
794 p%density%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
795 p%density%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
796 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
797 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
798 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
799 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
800 p%pressure%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
801 p%pressure%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
802 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
803 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4), &
804 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
805 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
806 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
807 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4))
811 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
812 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
813 p%pressure%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
814 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
815 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
816 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
817 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4), &
818 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,5))
823 p%density%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
824 p%density%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
825 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
826 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
827 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
828 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
829 p%velocity%data4d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
830 p%velocity%data4d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
831 p%pressure%data3d(il,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
832 p%pressure%data3d(ir,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
833 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
834 lambda(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,5), &
835 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
836 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
837 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
838 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4), &
839 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,5))
849 INTEGER,
INTENT(IN) :: j1,j2
851 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
852 INTENT(OUT) :: lambda,xvar
854 INTEGER :: jl,jr,vn,vt
856 SELECT TYPE(p => pvar)
860 SELECT CASE(
this%VDIM)
864 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
865 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,2), &
866 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
867 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
868 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
869 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3))
874 p%density%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
875 p%density%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
876 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,1), &
877 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,1), &
878 p%pressure%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
879 p%pressure%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
880 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
881 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
882 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
883 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
884 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3))
887 SELECT CASE(mesh%VECTOR_COMPONENTS)
888 CASE(ior(vector_x,vector_y))
891 CASE(ior(vector_y,vector_z))
900 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
901 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,vn), &
902 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
903 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
904 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
905 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
906 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4))
911 p%density%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
912 p%density%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
913 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,vn), &
914 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,vn), &
915 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,vt), &
916 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,vt), &
917 p%pressure%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
918 p%pressure%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
919 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
920 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
921 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
922 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
923 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
924 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4))
928 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
929 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,2), &
930 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
931 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
932 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
933 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
934 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
935 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,5))
939 CALL setcharvars3d(
this%fcsound%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,south), &
940 p%density%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
941 p%density%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
942 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,2), &
943 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,2), &
944 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,1), &
945 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,1), &
946 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX,3), &
947 p%velocity%data4d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX,3), &
948 p%pressure%data3d(mesh%IMIN:mesh%IMAX,jl,mesh%KMIN:mesh%KMAX), &
949 p%pressure%data3d(mesh%IMIN:mesh%IMAX,jr,mesh%KMIN:mesh%KMAX), &
950 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
951 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,5), &
952 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
953 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
954 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
955 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
956 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,5))
967 INTEGER,
INTENT(IN) :: k1,k2
969 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%JMIN:Mesh%JMAX,this%VNUM), &
970 INTENT(OUT) :: lambda,xvar
974 SELECT TYPE(p => pvar)
978 SELECT CASE(
this%VDIM)
982 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
983 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,3), &
984 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
985 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
986 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
987 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3))
992 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
993 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
994 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,1), &
995 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,1), &
996 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
997 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
998 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
999 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1000 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1001 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1002 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3))
1006 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1007 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,3), &
1008 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1009 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1010 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1011 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1012 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,4))
1017 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1018 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1019 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,2), &
1020 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,2), &
1021 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,1), &
1022 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,1), &
1023 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1024 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1025 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1026 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
1027 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1028 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1029 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1030 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4))
1034 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1035 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,3), &
1036 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1037 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1038 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1039 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1040 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,4), &
1041 lambda(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,5))
1046 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1047 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1048 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,3), &
1049 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,3), &
1050 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,1), &
1051 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,1), &
1052 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl,2), &
1053 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr,2), &
1054 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kl), &
1055 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,kr), &
1056 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1057 lambda(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,5), &
1058 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1059 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1060 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1061 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
1062 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,5))
1073 INTEGER,
INTENT(IN) :: i1,i2
1074 REAL,
DIMENSION(Mesh%JMIN:Mesh%JMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
1078 SELECT TYPE(p => pvar)
1080 SELECT CASE(
this%VDIM)
1083 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1084 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1085 p%pressure%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1086 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1087 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1088 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1089 p%density%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1090 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1091 p%pressure%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX))
1094 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1095 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1096 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1097 p%pressure%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1098 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1099 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1100 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1101 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4), &
1102 p%density%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1103 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1104 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1105 p%pressure%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX))
1108 p%density%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1109 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1110 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1111 p%velocity%data4d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1112 p%pressure%data3d(i1,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1113 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1114 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1115 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1116 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,4), &
1117 xvar(mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,5), &
1118 p%density%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX), &
1119 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,1), &
1120 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,2), &
1121 p%velocity%data4d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX,3), &
1122 p%pressure%data3d(i2,mesh%JMIN:mesh%JMAX,mesh%KMIN:mesh%KMAX))
1132 INTEGER,
INTENT(IN) :: j1,j2
1133 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%KMIN:Mesh%KMAX,this%VNUM), &
1139 SELECT TYPE(p => pvar)
1141 SELECT CASE(
this%VDIM)
1144 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1145 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,1), &
1146 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1147 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1148 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1149 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1150 p%density%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX), &
1151 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,1), &
1152 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX))
1155 SELECT CASE(mesh%VECTOR_COMPONENTS)
1156 CASE(ior(vector_x,vector_y))
1159 CASE(ior(vector_y,vector_z))
1167 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1168 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,vn), &
1169 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,vt), &
1170 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1171 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1172 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1173 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1174 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
1175 p%density%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX), &
1176 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,vn), &
1177 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,vt), &
1178 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX))
1181 p%density%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1182 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,2), &
1183 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,1), &
1184 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX,3), &
1185 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j1,mesh%KMIN:mesh%KMAX), &
1186 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,1), &
1187 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,2), &
1188 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,3), &
1189 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,4), &
1190 xvar(mesh%IMIN:mesh%IMAX,mesh%KMIN:mesh%KMAX,5), &
1191 p%density%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX), &
1192 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,2), &
1193 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,1), &
1194 p%velocity%data4d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX,3), &
1195 p%pressure%data3d(mesh%IMIN:mesh%IMAX,j2,mesh%KMIN:mesh%KMAX))
1205 INTEGER,
INTENT(IN) :: k1,k2
1206 REAL,
DIMENSION(Mesh%IMIN:Mesh%IMAX,Mesh%JMIN:Mesh%JMAX,this%VNUM), &
1210 SELECT TYPE(p => pvar)
1212 SELECT CASE(
this%VDIM)
1215 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1216 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
1217 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1218 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1219 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1220 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1221 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2), &
1222 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,1), &
1223 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2))
1226 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1227 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,2), &
1228 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
1229 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1230 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1231 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1232 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1233 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,4), &
1234 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2), &
1235 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,2), &
1236 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,1), &
1237 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2))
1240 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1241 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,3), &
1242 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,1), &
1243 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1,2), &
1244 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k1), &
1245 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,1), &
1246 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,2), &
1247 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,3), &
1248 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,4), &
1249 xvar(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,5), &
1250 p%density%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2), &
1251 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,3), &
1252 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,1), &
1253 p%velocity%data4d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2,2), &
1254 p%pressure%data3d(mesh%IMIN:mesh%IMAX,mesh%JMIN:mesh%JMAX,k2))
1499 IF (mesh%Geometry%GetType().NE.cartesian)
THEN 1500 SELECT TYPE(p => pvar)
1502 SELECT TYPE(c => cvar)
1504 SELECT TYPE(s => sterm)
1507 s%density%data1d(:) = 0.0
1508 s%energy%data1d(:) = 0.0
1509 SELECT CASE(mesh%VECTOR_COMPONENTS)
1513 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
1514 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
1515 p%velocity%data2d(:,1),0.0,0.0, &
1516 p%pressure%data1d(:), &
1521 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
1522 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
1523 0.0,p%velocity%data2d(:,1),0.0, &
1524 p%pressure%data1d(:), &
1529 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
1530 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
1531 0.0,0.0,p%velocity%data2d(:,1), &
1532 p%pressure%data1d(:), &
1534 CASE(ior(vector_x,vector_y))
1538 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
1539 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
1540 p%velocity%data2d(:,1),p%velocity%data2d(:,2),0.0, &
1541 p%pressure%data1d(:), &
1542 c%momentum%data2d(:,2),0.0)
1545 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
1546 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
1547 p%velocity%data2d(:,1),p%velocity%data2d(:,2),0.0, &
1548 p%pressure%data1d(:), &
1549 c%momentum%data2d(:,1),0.0)
1550 CASE(ior(vector_x,vector_z))
1554 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
1555 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
1556 p%velocity%data2d(:,1),0.0,p%velocity%data2d(:,2), &
1557 p%pressure%data1d(:), &
1558 0.0,c%momentum%data2d(:,2))
1561 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
1562 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
1563 p%velocity%data2d(:,1),0.0,p%velocity%data2d(:,2), &
1564 p%pressure%data1d(:), &
1565 c%momentum%data2d(:,1),0.0)
1566 CASE(ior(vector_y,vector_z))
1570 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
1571 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
1572 0.0,p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
1573 p%pressure%data1d(:), &
1574 0.0,c%momentum%data2d(:,2))
1577 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
1578 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
1579 0.0,p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
1580 p%pressure%data1d(:), &
1581 0.0,c%momentum%data2d(:,1))
1582 CASE(ior(ior(vector_x,vector_y),vector_z))
1585 mesh%cxyx%data2d(:,2),mesh%cxzx%data2d(:,2), &
1586 mesh%cyxy%data2d(:,2),mesh%czxz%data2d(:,2), &
1587 p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
1588 p%velocity%data2d(:,3),p%pressure%data1d(:), &
1589 c%momentum%data2d(:,2),c%momentum%data2d(:,3))
1592 mesh%cxyx%data2d(:,2),mesh%cyxy%data2d(:,2), &
1593 mesh%cyzy%data2d(:,2),mesh%czyz%data2d(:,2), &
1594 p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
1595 p%velocity%data2d(:,3),p%pressure%data1d(:), &
1596 c%momentum%data2d(:,1),c%momentum%data2d(:,3))
1599 mesh%cxzx%data2d(:,2),mesh%cyzy%data2d(:,2), &
1600 mesh%czxz%data2d(:,2),mesh%czyz%data2d(:,2), &
1601 p%velocity%data2d(:,1),p%velocity%data2d(:,2), &
1602 p%velocity%data2d(:,3),p%pressure%data1d(:), &
1603 c%momentum%data2d(:,1),c%momentum%data2d(:,2))
1606 s%momentum%data1d(:) = 0.0
1612 IF (mesh%INUM.GT.1)
THEN 1613 sterm%data4d(mesh%IGMIN:mesh%IMIN+mesh%IM1,:,:,:) = 0.0
1614 sterm%data4d(mesh%IMAX+mesh%IP1:mesh%IGMAX,:,:,:) = 0.0
1616 IF (mesh%JNUM.GT.1)
THEN 1617 sterm%data4d(:,mesh%JGMIN:mesh%JMIN+mesh%JM1,:,:) = 0.0
1618 sterm%data4d(:,mesh%JMAX+mesh%JP1:mesh%JGMAX,:,:) = 0.0
1620 IF (mesh%KNUM.GT.1)
THEN 1622 sterm%data3d(:,mesh%KGMIN:mesh%KMIN+mesh%KM1,:) = 0.0
1623 sterm%data3d(:,mesh%KMAX+mesh%KP1:mesh%KGMAX,:) = 0.0
1635 CALL this%physics_eulerisotherm%ExternalSources(accel,pvar,cvar,sterm)
1636 SELECT TYPE(p => pvar)
1638 SELECT TYPE(c => cvar)
1640 SELECT TYPE(s => sterm)
1642 s%energy%data1d(:) = sum(c%momentum%data2d(:,:) * accel%data2d(:,:),dim=2)
1648 PURE SUBROUTINE viscositysources(this,Mesh,pvar,btxx,btxy,btxz,btyy,btyz,btzz,sterm)
1655 DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX) &
1656 :: btxx,btxy,btxz,btyy,btyz,btzz
1658 CALL this%physics_eulerisotherm%ViscositySources(mesh,pvar,btxx,btxy,btxz,btyy,btyz,btzz,sterm)
1659 SELECT TYPE(p => pvar)
1661 SELECT TYPE(s => sterm)
1663 SELECT CASE(
this%VDIM)
1670 this%tmp(:,:,:) = p%velocity%data4d(:,:,:,1)*btxx(:,:,:) &
1671 + p%velocity%data4d(:,:,:,2)*btxy(:,:,:)
1674 this%tmp1(:,:,:) = p%velocity%data4d(:,:,:,1)*btxy(:,:,:) &
1675 + p%velocity%data4d(:,:,:,2)*btyy(:,:,:)
1678 CALL mesh%Divergence(
this%tmp(:,:,:),
this%tmp1(:,:,:), &
1679 s%energy%data3d(:,:,:))
1682 this%tmp(:,:,:) = p%velocity%data4d(:,:,:,1)*btxx(:,:,:) &
1683 + p%velocity%data4d(:,:,:,2)*btxy(:,:,:) &
1684 + p%velocity%data4d(:,:,:,3)*btxz(:,:,:)
1687 this%tmp1(:,:,:) = p%velocity%data4d(:,:,:,1)*btxy(:,:,:) &
1688 + p%velocity%data4d(:,:,:,2)*btyy(:,:,:) &
1689 + p%velocity%data4d(:,:,:,3)*btyz(:,:,:)
1692 this%tmp2(:,:,:) = p%velocity%data4d(:,:,:,1)*btxz(:,:,:) &
1693 + p%velocity%data4d(:,:,:,2)*btyz(:,:,:) &
1694 + p%velocity%data4d(:,:,:,3)*btzz(:,:,:)
1696 CALL mesh%Divergence(
this%tmp(:,:,:),
this%tmp1(:,:,:),
this%tmp2(:,:,:), &
1697 s%energy%data3d(:,:,:))
1722 REAL,
DIMENSION(Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1728 IF (
this%transformed_xvelocity)
THEN 1729 SELECT TYPE(p => pvar)
1731 SELECT TYPE(c => cvar)
1733 DO k=mesh%KGMIN,mesh%KGMAX
1734 DO j=mesh%JGMIN,mesh%JGMAX
1735 DO i=mesh%IGMIN,mesh%IGMAX
1738 c%energy%data3d(i,j,k) = c%energy%data3d(i,j,k) &
1739 + w(j,k)*(c%momentum%data4d(i,j,k,1) &
1740 + 0.5*c%density%data3d(i,j,k)*w(j,k))
1741 p%velocity%data4d(i,j,k,1) = p%velocity%data4d(i,j,k,1) + w(j,k)
1742 c%momentum%data4d(i,j,k,1) = c%momentum%data4d(i,j,k,1) &
1743 + c%density%data3d(i,j,k)*w(j,k)
1747 this%transformed_xvelocity = .false.
1768 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1774 IF (
this%transformed_yvelocity)
THEN 1775 SELECT TYPE(p => pvar)
1777 SELECT TYPE(c => cvar)
1779 DO k=mesh%KGMIN,mesh%KGMAX
1780 DO j=mesh%JGMIN,mesh%JGMAX
1781 DO i=mesh%IGMIN,mesh%IGMAX
1784 c%energy%data3d(i,j,k) = c%energy%data3d(i,j,k) &
1785 + w(i,k)*(c%momentum%data4d(i,j,k,2) &
1786 + 0.5*c%density%data3d(i,j,k)*w(i,k))
1787 p%velocity%data4d(i,j,k,2) = p%velocity%data4d(i,j,k,2) + w(i,k)
1788 c%momentum%data4d(i,j,k,2) = c%momentum%data4d(i,j,k,2) &
1789 + c%density%data3d(i,j,k)*w(i,k)
1793 this%transformed_yvelocity = .false.
1814 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX), &
1820 IF (
this%transformed_zvelocity)
THEN 1821 SELECT TYPE(p => pvar)
1823 SELECT TYPE(c => cvar)
1825 DO k=mesh%KGMIN,mesh%KGMAX
1826 DO j=mesh%JGMIN,mesh%JGMAX
1827 DO i=mesh%IGMIN,mesh%IGMAX
1830 c%energy%data3d(i,j,k) = c%energy%data3d(i,j,k) &
1831 + w(i,j)*(c%momentum%data4d(i,j,k,3) &
1832 + 0.5*c%density%data3d(i,j,k)*w(i,j))
1833 p%velocity%data4d(i,j,k,3) = p%velocity%data4d(i,j,k,3) + w(i,j)
1834 c%momentum%data4d(i,j,k,3) = c%momentum%data4d(i,j,k,3) &
1835 + c%density%data3d(i,j,k)*w(i,j)
1839 this%transformed_zvelocity = .false.
1860 REAL,
DIMENSION(Mesh%JGMIN:Mesh%JGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1866 IF (.NOT.
this%transformed_xvelocity)
THEN 1867 SELECT TYPE(p => pvar)
1869 SELECT TYPE(c => cvar)
1871 DO k=mesh%KGMIN,mesh%KGMAX
1872 DO j=mesh%JGMIN,mesh%JGMAX
1873 DO i=mesh%IGMIN,mesh%IGMAX
1876 c%energy%data3d(i,j,k) = c%energy%data3d(i,j,k) &
1877 - w(j,k)*(c%momentum%data4d(i,j,k,1) &
1878 - 0.5*c%density%data3d(i,j,k)*w(j,k))
1879 p%velocity%data4d(i,j,k,1) = p%velocity%data4d(i,j,k,1) - w(j,k)
1880 c%momentum%data4d(i,j,k,1) = c%momentum%data4d(i,j,k,1) &
1881 - c%density%data3d(i,j,k)*w(j,k)
1885 this%transformed_xvelocity = .true.
1906 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%KGMIN:Mesh%KGMAX), &
1912 IF (.NOT.
this%transformed_yvelocity)
THEN 1913 SELECT TYPE(p => pvar)
1915 SELECT TYPE(c => cvar)
1917 DO k=mesh%KGMIN,mesh%KGMAX
1918 DO j=mesh%JGMIN,mesh%JGMAX
1919 DO i=mesh%IGMIN,mesh%IGMAX
1922 c%energy%data3d(i,j,k) = c%energy%data3d(i,j,k) &
1923 - w(i,k)*(c%momentum%data4d(i,j,k,2) &
1924 - 0.5*c%density%data3d(i,j,k)*w(i,k))
1925 p%velocity%data4d(i,j,k,2) = p%velocity%data4d(i,j,k,2) - w(i,k)
1926 c%momentum%data4d(i,j,k,2) = c%momentum%data4d(i,j,k,2) &
1927 - c%density%data3d(i,j,k)*w(i,k)
1931 this%transformed_yvelocity = .true.
1952 REAL,
DIMENSION(Mesh%IGMIN:Mesh%IGMAX,Mesh%JGMIN:Mesh%JGMAX), &
1958 IF (.NOT.
this%transformed_zvelocity)
THEN 1959 SELECT TYPE(p => pvar)
1961 SELECT TYPE(c => cvar)
1963 DO k=mesh%KGMIN,mesh%KGMAX
1964 DO j=mesh%JGMIN,mesh%JGMAX
1965 DO i=mesh%IGMIN,mesh%IGMAX
1968 c%energy%data3d(i,j,k) = c%energy%data3d(i,j,k) &
1969 - w(i,j)*(c%momentum%data4d(i,j,k,3) &
1970 - 0.5*c%density%data3d(i,j,k)*w(i,j))
1971 p%velocity%data4d(i,j,k,3) = p%velocity%data4d(i,j,k,3) - w(i,j)
1972 c%momentum%data4d(i,j,k,3) = c%momentum%data4d(i,j,k,3) &
1973 - c%density%data3d(i,j,k)*w(i,j)
1977 this%transformed_zvelocity = .true.
1990 IF (pvar%density%RANK.EQ.0)
THEN 1992 pvar%density%data1d(:),pvar%pressure%data1d(:))
1995 pvar%density%data1d(:),pvar%pressure%data1d(:))
2003 CLASS(physics_euler),
INTENT(INOUT) :: this
2005 CALL this%physics_eulerisotherm%Finalize()
2020 INTEGER,
OPTIONAL,
INTENT(IN) :: flavour,num
2027 SELECT CASE(flavour)
2030 ALLOCATE(new_sv%pressure)
2033 CALL new_sv%AppendMArray(new_sv%pressure)
2036 ALLOCATE(new_sv%energy)
2039 CALL new_sv%AppendMArray(new_sv%energy)
2041 CALL physics%Warning(
"physics_euler::CreateStateVector",
"incomplete state vector")
2050 INTEGER,
OPTIONAL,
INTENT(IN) :: flavour,num
2052 IF (.NOT.physics%Initialized()) &
2053 CALL physics%Error(
"physics_eulerisotherm::CreateStatevector",
"Physics not initialized.")
2057 IF (
PRESENT(flavour))
THEN 2058 SELECT CASE(flavour)
2059 CASE(primitive,conservative)
2060 new_sv%flavour = flavour
2062 new_sv%flavour = undefined
2065 SELECT CASE(new_sv%flavour)
2068 ALLOCATE(new_sv%density,new_sv%velocity,new_sv%pressure)
2070 IF (
PRESENT(num))
THEN 2080 CALL new_sv%AppendMArray(new_sv%density)
2081 CALL new_sv%AppendMArray(new_sv%velocity)
2082 CALL new_sv%AppendMArray(new_sv%pressure)
2085 ALLOCATE(new_sv%density,new_sv%momentum,new_sv%energy)
2087 IF (
PRESENT(num))
THEN 2097 CALL new_sv%AppendMArray(new_sv%density)
2098 CALL new_sv%AppendMArray(new_sv%momentum)
2099 CALL new_sv%AppendMArray(new_sv%energy)
2101 CALL physics%Warning(
"physics_euler::CreateStateVector_euler",
"Empty state vector created.")
2109 CLASS(statevector_euler),
INTENT(INOUT) :: this
2110 CLASS(marray_base),
INTENT(IN) :: ma
2112 CALL this%statevector_eulerisotherm%AssignMArray_0(ma)
2113 IF (
SIZE(this%data1d).GT.0)
THEN 2114 SELECT TYPE(src => ma)
2116 SELECT CASE(this%flavour)
2119 this%pressure => this%GetItem(this%NextItem(this%NextItem(this%FirstItem())))
2122 this%energy => this%GetItem(this%NextItem(this%NextItem(this%FirstItem())))
2137 ELEMENTAL FUNCTION getsoundspeed(gamma,density,pressure)
RESULT(cs)
2140 REAL,
INTENT(IN) :: gamma,density,pressure
2143 cs = sqrt(max(2.0*tiny(cs),gamma*pressure/density))
2148 ELEMENTAL SUBROUTINE setroeaverages(gamma,rhoL,rhoR,ul,uR,vL,vR,pL,pR,eL,eR,u,cs)
2151 REAL,
INTENT(IN) :: gamma,rhol,rhor,ul,ur,vl,vr,pl,pr,el,er
2152 REAL,
INTENT(OUT) :: u,cs
2154 REAL :: sqrtrhol,sqrtrhor,invsqrtrho,v,hl,hr,h
2156 sqrtrhol = sqrt(rhol)
2157 sqrtrhor = sqrt(rhor)
2159 invsqrtrho = 1./ (sqrtrhol + sqrtrhor)
2161 u = (sqrtrhol*ul + sqrtrhor*ur) * invsqrtrho
2162 v = (sqrtrhol*vl + sqrtrhor*vr) * invsqrtrho
2164 hl = (el + pl) / rhol
2165 hr = (er + pr) / rhor
2166 h = (sqrtrhol * hl + sqrtrhor * hr) * invsqrtrho
2168 cs = sqrt((gamma-1.)*(h-0.5*(u**2+v**2)))
2175 REAL,
INTENT(IN) :: cs,v
2176 REAL,
INTENT(OUT) :: minwav,maxwav
2179 minwav = min(0.,v-cs)
2180 maxwav = max(0.,v+cs)
2187 REAL,
INTENT(IN) :: gamma,rho,v,p
2188 REAL,
INTENT(OUT) :: l1,l2,l3
2204 REAL,
INTENT(IN) :: gamma,rho,v,p
2205 REAL,
INTENT(OUT) :: l1,l2,l3,l4
2215 REAL,
INTENT(IN) :: gamma,rho,v,p
2216 REAL,
INTENT(OUT) :: l1,l2,l3,l4,l5
2225 pL,pR,eL,eR,amin,amax,rho,mu,mv,e,a)
2228 REAL,
INTENT(IN) :: rhol,rhor,ul,ur,vl,vr,pl,pr,el,er,amin,amax
2229 REAL,
INTENT(OUT) :: rho,mu,mv,e,a
2233 ql = rhol * (ul-amin)
2234 qr = rhor * (ur-amax)
2236 a = (pr - pl + qr*ur - ql*ul) / (qr - ql)
2240 rho = ql / (a - amin)
2243 e = rho * (el/rhol + (a - ul) * (a - pl/ql))
2246 rho = qr / (a - amax)
2249 e = rho * (er/rhor + (a - ur) * (a - pr/qr))
2254 ELEMENTAL SUBROUTINE setcharvars1d(gamma,rho1,rho2,u1,u2,P1,P2,l1,l3, &
2258 REAL,
INTENT(IN) :: gamma,rho1,rho2,u1,u2,p1,p2,l1,l3
2259 REAL,
INTENT(OUT) :: xvar1,xvar2,xvar3
2261 REAL :: gammadu_cs,dlnp
2265 gammadu_cs = 2*gamma*(u2-u1) / (l3-l1)
2267 xvar1 = dlnp - gammadu_cs
2268 xvar2 = dlnp - gamma * log(rho2/rho1)
2269 xvar3 = dlnp + gammadu_cs
2273 ELEMENTAL SUBROUTINE setcharvars2d(gamma,rho1,rho2,u1,u2,v1,v2,P1,P2,l1,l4, &
2274 xvar1,xvar2,xvar3,xvar4)
2277 REAL,
INTENT(IN) :: gamma,rho1,rho2,u1,u2,v1,v2,p1,p2,l1,l4
2278 REAL,
INTENT(OUT) :: xvar1,xvar2,xvar3,xvar4
2280 CALL setcharvars1d(gamma,rho1,rho2,u1,u2,p1,p2,l1,l4,xvar1,xvar2,xvar4)
2285 ELEMENTAL SUBROUTINE setcharvars3d(gamma,rho1,rho2,u1,u2,v1,v2,w1,w2,P1,P2, &
2286 l1,l5,xvar1,xvar2,xvar3,xvar4,xvar5)
2289 REAL,
INTENT(IN) :: gamma,rho1,rho2,u1,u2,v1,v2,w1,w2,p1,p2,l1,l5
2290 REAL,
INTENT(OUT) :: xvar1,xvar2,xvar3,xvar4,xvar5
2292 CALL setcharvars2d(gamma,rho1,rho2,u1,u2,v1,v2,p1,p2,l1,l5,xvar1,xvar2,xvar3,xvar5)
2299 xvar2,xvar3,rho2,u2,P2)
2302 INTEGER,
INTENT(IN) :: delta
2303 REAL,
INTENT(IN) :: gamma,rho1,u1,p1,xvar1,xvar2,xvar3
2304 REAL,
INTENT(OUT) :: rho2,u2,p2
2308 dlnp = 0.5*(xvar3+xvar1)
2310 rho2 = rho1 * exp(delta/gamma*(dlnp-xvar2))
2311 p2 = p1 * exp(delta*dlnp)
2315 u2 = u1 + 0.5*delta*cs/gamma * (xvar3-xvar1)
2321 xvar2,xvar3,xvar4,rho2,u2,v2,P2)
2324 INTEGER,
INTENT(IN) :: delta
2325 REAL,
INTENT(IN) :: gamma,rho1,u1,v1,p1,xvar1,xvar2,xvar3,xvar4
2326 REAL,
INTENT(OUT) :: rho2,u2,v2,p2
2328 CALL setboundarydata1d(delta,gamma,rho1,u1,p1,xvar1,xvar2,xvar4,rho2,u2,p2)
2329 v2 = v1 + delta*xvar3
2335 xvar2,xvar3,xvar4,xvar5,rho2,u2,v2,w2,P2)
2338 INTEGER,
INTENT(IN) :: delta
2339 REAL,
INTENT(IN) :: gamma,rho1,u1,v1,w1,p1,xvar1,xvar2,xvar3,xvar4,xvar5
2340 REAL,
INTENT(OUT) :: rho2,u2,v2,w2,p2
2342 CALL setboundarydata2d(delta,gamma,rho1,u1,v1,p1,xvar1,xvar2,xvar3,xvar5,rho2,u2,v2,p2)
2343 w2 = w1 + delta*xvar4
2394 ELEMENTAL SUBROUTINE setflux1d(rho,u,P,mu,E,f1,f2,f3)
2397 REAL,
INTENT(IN) :: rho,u,p,mu,e
2398 REAL,
INTENT(OUT) :: f1,f2,f3
2406 ELEMENTAL SUBROUTINE setflux2d(rho,u,P,mu,mv,E,f1,f2,f3,f4)
2409 REAL,
INTENT(IN) :: rho,u,p,mu,mv,e
2410 REAL,
INTENT(OUT) :: f1,f2,f3,f4
2417 ELEMENTAL SUBROUTINE setflux3d(rho,u,P,mu,mv,mw,E,f1,f2,f3,f4,f5)
2420 REAL,
INTENT(IN) :: rho,u,p,mu,mv,mw,e
2421 REAL,
INTENT(OUT) :: f1,f2,f3,f4,f5
2423 CALL setflux2d(rho,u,p,mu,mv,e,f1,f2,f3,f5)
2428 ELEMENTAL SUBROUTINE cons2prim1d(gamma,rho_in,mu,E,rho_out,u,P)
2431 REAL,
INTENT(IN) :: gamma,rho_in,mu,e
2432 REAL,
INTENT(OUT) :: rho_out,u,p
2439 p = (gamma-1.)*(e - 0.5 * inv_rho * mu*mu)
2443 ELEMENTAL SUBROUTINE cons2prim2d(gamma,rho_in,mu,mv,E,rho_out,u,v,P)
2446 REAL,
INTENT(IN) :: gamma,rho_in,mu,mv,e
2447 REAL,
INTENT(OUT) :: rho_out,u,v,p
2455 p = (gamma-1.)*(e - 0.5 * inv_rho * (mu*mu + mv*mv))
2459 ELEMENTAL SUBROUTINE cons2prim3d(gamma,rho_in,mu,mv,mw,E,rho_out,u,v,w,P)
2462 REAL,
INTENT(IN) :: gamma,rho_in,mu,mv,mw,e
2463 REAL,
INTENT(OUT) :: rho_out,u,v,w,p
2472 p = (gamma-1.)*(e - 0.5 * inv_rho * (mu*mu + mv*mv + mw*mw))
2476 ELEMENTAL SUBROUTINE prim2cons1d(gamma,rho_in,u,P,rho_out,mu,E)
2479 REAL,
INTENT(IN) :: gamma,rho_in,u,p
2480 REAL,
INTENT(OUT) :: rho_out,mu,e
2484 e = p/(gamma-1.) + 0.5 * rho_in * u*u
2488 ELEMENTAL SUBROUTINE prim2cons2d(gamma,rho_in,u,v,P,rho_out,mu,mv,E)
2491 REAL,
INTENT(IN) :: gamma,rho_in,u,v,p
2492 REAL,
INTENT(OUT) :: rho_out,mu,mv,e
2497 e = p/(gamma-1.) + 0.5 * rho_in * (u*u + v*v)
2501 ELEMENTAL SUBROUTINE prim2cons3d(gamma,rho_in,u,v,w,P,rho_out,mu,mv,mw,E)
2504 REAL,
INTENT(IN) :: gamma,rho_in,u,v,w,p
2505 REAL,
INTENT(OUT) :: rho_out,mu,mv,mw,e
2511 e = p/(gamma-1.) + 0.5 * rho_in * (u*u + v*v + w*w)
2526 REAL,
INTENT(IN) :: cxyx,cxzx,cyxy,czxz,vx,vy,vz,p,my,mz
2537 REAL,
INTENT(IN) :: cxyx,cyxy,cyzy,czyz,vx,vy,vz,p,mx,mz
2548 REAL,
INTENT(IN) :: cxzx,cyzy,czxz,czyz,vx,vy,vz,p,mx,my
elemental subroutine cons2prim2d(gamma, rho_in, mu, mv, E, rho_out, u, v, P)
Convert from 2D conservative to primitive variables.
subroutine finalize(this)
Destructor of common class.
subroutine, public createstatevector_euler(Physics, new_sv, flavour, num)
elemental subroutine setflux3d(rho, u, P, mu, mv, mw, E, f1, f2, f3, f4, f5)
set mass, 3D momentum and energy flux for transport along the 1st dimension
elemental subroutine setboundarydata1d(delta, gamma, rho1, u1, P1, xvar1, xvar2, xvar3, rho2, u2, P2)
extrapolate primitive variables using characteristic pseudo pevariables 1D transport ...
pure subroutine viscositysources(this, Mesh, pvar, btxx, btxy, btxz, btyy, btyz, btzz, sterm)
pure subroutine calculatecharsystemz(this, Mesh, k1, k2, pvar, lambda, xvar)
elemental subroutine setflux1d(rho, u, P, mu, E, f1, f2, f3)
set mass, 1D momentum and energy flux for transport along the 1st dimension
subroutine printconfiguration_euler(this)
pure subroutine calculatecharsystemy(this, Mesh, j1, j2, pvar, lambda, xvar)
type(logging_base), save this
derived class for compound of mesh arrays
pure subroutine addbackgroundvelocityx(this, Mesh, w, pvar, cvar)
Adds a background velocity field for fargo routines.
base class for mesh arrays
pure subroutine calculateboundarydatay(this, Mesh, j1, j2, xvar, pvar)
elemental real function getgeometricalsourcex(cxyx, cxzx, cyxy, czxz, vx, vy, vz, P, my, mz)
geometrical momentum source terms P is the either isothermal pressure rho*cs**2 or the real pressure...
real, save nan_default_real
NaN real constant.
pure subroutine updatesoundspeed(this, pvar)
elemental subroutine seteigenvalues2d(gamma, rho, v, P, l1, l2, l3, l4)
set all eigenvalues for 2D transport (used in absorbing boundary conditions)
elemental subroutine cons2prim1d(gamma, rho_in, mu, E, rho_out, u, P)
Convert from 1D conservative to primitive variables.
elemental subroutine setroeaverages(gamma, rhoL, rhoR, ul, uR, vL, vR, pL, pR, eL, eR, u, cs)
elemental real function getgeometricalsourcez(cxzx, cyzy, czxz, czyz, vx, vy, vz, P, mx, my)
z-momentum geometrical source term
elemental subroutine seteigenvalues1d(gamma, rho, v, P, l1, l2, l3)
set all eigenvalues for 1D transport (used in absorbing boundary conditions)
subroutine initphysics_euler(this, Mesh, config, IO)
constructor of physics_euler class
pure subroutine calcfluxesx(this, Mesh, nmin, nmax, prim, cons, xfluxes)
Calculate Fluxes in x-direction.
elemental subroutine setcharvars2d(gamma, rho1, rho2, u1, u2, v1, v2, P1, P2, l1, l4, xvar1, xvar2, xvar3, xvar4)
compute characteristic variables for 2D transport
elemental real function getgeometricalsourcey(cxyx, cyxy, cyzy, czyz, vx, vy, vz, P, mx, mz)
y-momentum geometrical source term
pure subroutine geometricalsources(this, Mesh, pvar, cvar, sterm)
Calculates geometrical sources.
character(len=32), parameter problem_name
pure subroutine subtractbackgroundvelocityz(this, Mesh, w, pvar, cvar)
Substracts a background velocity field for fargo routines.
elemental real function getsoundspeed(gamma, density, pressure)
physics module for 1D,2D and 3D isothermal Euler equations
pure subroutine convert2conservative_all(this, pvar, cvar)
Converts primitive to conservative variables on the whole mesh.
named integer constants for flavour of state vectors
pure subroutine calculateboundarydataz(this, Mesh, k1, k2, xvar, pvar)
elemental subroutine prim2cons2d(gamma, rho_in, u, v, P, rho_out, mu, mv, E)
Convert from 2D primitive to conservative variables.
pure subroutine calcfluxesz(this, Mesh, nmin, nmax, prim, cons, zfluxes)
Calculate Fluxes in z-direction.
elemental subroutine setcharvars3d(gamma, rho1, rho2, u1, u2, v1, v2, w1, w2, P1, P2, l1, l5, xvar1, xvar2, xvar3, xvar4, xvar5)
compute characteristic variables for 3D transport
elemental subroutine setwavespeeds(cs, v, minwav, maxwav)
set minimal and maximal wave speeds
Dictionary for generic data types.
pure subroutine subtractbackgroundvelocityy(this, Mesh, w, pvar, cvar)
Substracts a background velocity field for fargo routines.
physics module for 1D,2D and 3D non-isothermal Euler equations
pure subroutine convert2primitive_all(this, cvar, pvar)
Converts conservative to primitive variables on the whole mesh.
elemental subroutine setcharvars1d(gamma, rho1, rho2, u1, u2, P1, P2, l1, l3, xvar1, xvar2, xvar3)
compute characteristic variables for 1D transport
elemental subroutine seteigenvalues3d(gamma, rho, v, P, l1, l2, l3, l4, l5)
set all eigenvalues for 3D transport (used in absorbing boundary conditions)
elemental subroutine setboundarydata3d(delta, gamma, rho1, u1, v1, w1, P1, xvar1, xvar2, xvar3, xvar4, xvar5, rho2, u2, v2, w2, P2)
extrapolate primitive variables using characteristic pseudo pevariables 2D transport ...
type(statevector_euler) function createstatevector(Physics, flavour, num)
Constructor of statevector_euler.
pure subroutine externalsources(this, accel, pvar, cvar, sterm)
compute momentum and energy sources given an external force
pure subroutine calculatecharsystemx(this, Mesh, i1, i2, pvar, lambda, xvar)
pure subroutine convert2conservative_subset(this, i1, i2, j1, j2, k1, k2, pvar, cvar)
Converts primitive to conservative variables on a subset of the data.
elemental subroutine prim2cons3d(gamma, rho_in, u, v, w, P, rho_out, mu, mv, mw, E)
Convert from 3D primitive to conservative variables.
pure subroutine addbackgroundvelocityy(this, Mesh, w, pvar, cvar)
Adds a background velocity field for fargo routines.
pure subroutine calculateboundarydatax(this, Mesh, i1, i2, xvar, pvar)
extrapolate pvar using characteristic pseudo variables (absorbing boundaries)
integer, parameter, public euler
elemental subroutine cons2prim3d(gamma, rho_in, mu, mv, mw, E, rho_out, u, v, w, P)
Convert from 3D conservative to primitive variables.
pure subroutine calcfluxesy(this, Mesh, nmin, nmax, prim, cons, yfluxes)
Calculate Fluxes in y-direction.
subroutine assignmarray_0(this, ma)
assigns one mesh array to another mesh array
pure subroutine addbackgroundvelocityz(this, Mesh, w, pvar, cvar)
Adds a background velocity field for fargo routines.
elemental subroutine setflux2d(rho, u, P, mu, mv, E, f1, f2, f3, f4)
set mass, 2D momentum and energy flux for transport along the 1st dimension
elemental subroutine setintermediatestate(rhoL, rhoR, uL, uR, vl, vR, pL, pR, eL, eR, amin, amax, rho, mu, mv, e, a)
pure subroutine convert2primitive_subset(this, i1, i2, j1, j2, k1, k2, cvar, pvar)
Converts conservative to primitive variables on a subset of the data.
elemental subroutine prim2cons1d(gamma, rho_in, u, P, rho_out, mu, E)
Convert from 1D primitive to conservative variables.
pure subroutine subtractbackgroundvelocityx(this, Mesh, w, pvar, cvar)
Substracts a background velocity field for fargo routines.
elemental subroutine setboundarydata2d(delta, gamma, rho1, u1, v1, P1, xvar1, xvar2, xvar3, xvar4, rho2, u2, v2, P2)
extrapolate primitive variables using characteristic pseudo pevariables 2D transport ...