Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-TGV for both TGV and OT-MHD cases #5

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions src/BC-TGV.f90
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,12 @@ subroutine init_tgv (ux1,uy1,uz1,ep1,phi1)
do i=1,xsize(1)
x=real(i-1,mytype)*dx

! ux1(i,j,k)=+sin_prec(x)*cos_prec(y)*cos_prec(z)
! uy1(i,j,k)=-cos_prec(x)*sin_prec(y)*cos_prec(z)
! if (iscalar == 1) then
! phi1(i,j,k,1:numscalar)=sin_prec(x)*sin_prec(y)*cos_prec(z)
! endif

ux1(i,j,k)= -2.d0*sin_prec(y)*cos_prec(z)
uy1(i,j,k)= 2.d0*sin_prec(x)*cos_prec(z)

uz1(i,j,k)=zero

if(mhd_active) then

ux1(i,j,k)= -2.d0*sin_prec(y)*cos_prec(z)
uy1(i,j,k)= 2.d0*sin_prec(x)*cos_prec(z)
uz1(i,j,k)=zero
!
Bm(i,j,k,1)=-2.d0*sin_prec(y)
Bm(i,j,k,2)= 2.d0*sin_prec(2.d0*x)
Bm(i,j,k,3)=zero
Expand All @@ -99,7 +93,20 @@ subroutine init_tgv (ux1,uy1,uz1,ep1,phi1)
Bmean(i,j,k,2)=zero
Bmean(i,j,k,3)=zero

endif
else

ux1(i,j,k)=+sin_prec(x)*cos_prec(y)*cos_prec(z)
uy1(i,j,k)=-cos_prec(x)*sin_prec(y)*cos_prec(z)
if (iscalar == 1) then
phi1(i,j,k,1:numscalar)=sin_prec(x)*sin_prec(y)*cos_prec(z)
endif

ux1(i,j,k)= -2.d0*sin_prec(y)*cos_prec(z)
uy1(i,j,k)= 2.d0*sin_prec(x)*cos_prec(z)

uz1(i,j,k)=zero

endif

enddo
enddo
Expand Down
Loading