[FLASH-USERS] MHD B-field out of the plane

Ernesto Zurbriggen ezurbriggen at unc.edu.ar
Fri Jul 22 10:29:09 EDT 2022


Hi Aodhan!

Defining the initial magnetic field (bx,by,bz) in the way below for a
2D-cartesian mesh at least worked for me.

I hope that it can help you!


! Define face quantities
! Cell face-centred variables for the StaggeredMesh scheme
    do k=blkGC(LOW,KAXIS),blkGC(HIGH,KAXIS)
      do j=blkGC(LOW,JAXIS),blkGC(HIGH,JAXIS)
        do i=blkGC(LOW,IAXIS),blkGC(HIGH,IAXIS)
                             .
                             .
                             .
          Sfacex(MAG_FACE_VAR,i,j,k)=Bx
          Sfacey(MAG_FACE_VAR,i,j,k)=By

          !*** Campo magnético Bz
          ! Just possible cell-centred
          Sfacez(MAG_FACE_VAR,i,j,k)=Bz

        enddo
      enddo
    enddo

! Define centred quantities
  do k = blkGC(LOW,KAXIS),blkGC(HIGH,KAXIS)
    do j = blkGC(LOW,JAXIS),blkGC(HIGH,JAXIS)
      do i = blkGC(LOW,IAXIS),blkGC(HIGH,IAXIS)
                                  .
                                  .
                                  .

S(MAGX_VAR,i,j,k)=0.5*(Sfacex(MAG_FACE_VAR,i,j,k)+Sfacex(MAG_FACE_VAR,i+1,
j , k ))

S(MAGY_VAR,i,j,k)=0.5*(Sfacey(MAG_FACE_VAR,i,j,k)+Sfacey(MAG_FACE_VAR, i
,j+1, k ))
          S(MAGZ_VAR,i,j,k)=     Sfacez(MAG_FACE_VAR,i,j,k)
                                  .
                                  .
      enddo
    enddo
  enddo


El vie, 22 jul 2022 a las 8:07, Aodhan McIlvenny (<amcilvenny01 at qub.ac.uk>)
escribió:

> Hello all,
>
>
>
> I’ve set up an MHD simulation with the LaserSlab set up with a magnetic
> field by combining a few examples. The code works as expected when defining
> a magnetic field in the plane of the 2D simulation (cartesian or
> cylindrical) but computes a 0 or negative dt when defining it in the
> orthogonal direction (z) which is not resolved. Am I missing something
> obvious to run the simulation with a uniform magnetic field transverse to
> the simulation plane?
>
>
>
> Thanks in advance
>
>
>
> Best wishes,
>
> Aodhan
>
>
>
>
> _______________________________________________
> flash-users mailing list
> flash-users at flash.rochester.edu
>
> For list info, including unsubscribe:
> https://flash.rochester.edu/mailman/listinfo/flash-users
>


-- 

*Dr. Ernesto Zurbriggen, *
*Investigador Asistente (CONICET)*



*Correo: ezurbriggen@ <ernesto.zurbriggen at craam.mackenzie.br>unc.edu.ar
<http://unc.edu.ar>Teléfono IP: (+54) 351-535 3776 (int. 75601)*
*Instituto de Astronomía Teórica y Experimental (IATE-CONICET), *
*calle Francisco Laprida 922**, CP 5000, Córdoba, Argentina. *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20220722/b5bebf98/attachment-0001.htm>


More information about the flash-users mailing list