Skip to content

Commit 46b97cb

Browse files
authored
Centrifugal Buoyancy Term
Add the centrifugal buoyancy via the terms CAr andCAt. This is only possible whenn Ek>0 annd the buoyancy coefficient gamma also is above zero.
1 parent 8a2b596 commit 46b97cb

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

src/Namelists.f90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ subroutine readNamelists(tscheme)
7777
& mpi_transp,l_adv_curl,mpi_packing
7878

7979
namelist/phys_param/ &
80-
& ra,rae,raxi,pr,sc,prmag,ek,epsc0,epscxi0,radratio,Bn, &
80+
& ra,rae,raxi,pr,sc,prmag,ek,gamma,epsc0,epscxi0,radratio,Bn, &
8181
& ktops,kbots,ktopv,kbotv,ktopb,kbotb,kbotxi,ktopxi, &
8282
& s_top,s_bot,impS,sCMB,xi_top,xi_bot,impXi,xiCMB, &
8383
& nVarCond,con_DecRate,con_RadRatio,con_LambdaMatch, &
@@ -551,7 +551,7 @@ subroutine readNamelists(tscheme)
551551
end if
552552

553553
!-- If dilution factor is not zero, then centrifugal force on
554-
if (dilution_fac == 0.0_cp) then
554+
if (dilution_fac == 0.0_cp .and. (l_non_rot .or. gamma == 0.0_cp)) then
555555
l_centrifuge = .false.
556556
else
557557
l_centrifuge = .true.
@@ -574,7 +574,7 @@ subroutine readNamelists(tscheme)
574574
end if
575575

576576
if ( l_centrifuge .and. .not. &
577-
& (l_anel .and. .not. l_isothermal .and. (index(interior_model, "NONE")/=0)) ) then
577+
& (l_anel .and. .not. l_isothermal .and. (index(interior_model, "NONE")/=0)) .and. gamma == 0.0_cp ) then
578578
call abortRun("This case is not implemented.")
579579
! centrifugal acceleration implemented for anelastic polytropic background so far
580580
end if
@@ -934,6 +934,7 @@ subroutine writeNamelists(n_out)
934934
write(n_out,'('' sc ='',ES14.6,'','')') sc
935935
write(n_out,'('' prmag ='',ES14.6,'','')') prmag
936936
write(n_out,'('' ek ='',ES14.6,'','')') ek
937+
write(n_out,'('' gamma ='',ES14.6,'','')') gamma
937938
write(n_out,'('' po ='',ES14.6,'','')') po
938939
write(n_out,'('' stef ='',ES14.6,'','')') stef
939940
write(n_out,'('' tmelt ='',ES14.6,'','')') tmelt

src/get_nl.f90

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module grid_space_arrays_mod
2323
use radial_functions, only: or2, orho1, beta, otemp1, visc, r, or3, &
2424
& lambda, or4, or1
2525
use physical_parameters, only: radratio, LFfac, n_r_LCR, prec_angle, ViscHeatFac, &
26-
& oek, po, dilution_fac, ra, rae, opr, OhmLossFac, &
26+
& oek, po, dilution_fac, ra, rae, gamma, opr, OhmLossFac, &
2727
& epsPhase, phaseDiffFac, penaltyFac, tmelt
2828
use horizontal_data, only: sinTheta, cosTheta, phi, O_sin_theta_E2, &
2929
& cosn_theta_E2, O_sin_theta
@@ -369,7 +369,7 @@ subroutine get_nl(this, time, nR, nBc, lRmsCalc)
369369
& this%vrc(:,nPhi)*cosTheta(:))
370370
end if ! precession term required ?
371371

372-
if ( l_centrifuge .and. nBc ==0 ) then
372+
if ( l_centrifuge .and. nBc == 0 .and. gamma == 0.0_cp) then
373373
!if ( l_anel ) then
374374
! this%CAr(:,nPhi) = dilution_fac*r(nR)*sinTheta(:)**4* &
375375
! & ( -ra*opr*this%sc(:,nPhi) )
@@ -387,6 +387,13 @@ subroutine get_nl(this, time, nR, nBc, lRmsCalc)
387387
!end if
388388
end if ! centrifuge
389389

390+
if (l_centrifuge .and. gamma > 0) then
391+
! ---- r^2 * (-gamma) / Ek^2 * sin(theta)^2 * T
392+
this%CAr(:,nPhi) = -gamma * oek**2 * r(nR)**3 * sinTheta(:)**2 * this%sc(:,nPhi)
393+
! ---- sin(theta)/r * (-gamma) / Ek^2 * sin(theta) * cos(theta) * T
394+
this%CAt(:,nPhi) = -gamma * oek**2 * sinTheta(:)**2 * cosTheta(:) * this%sc(:,nPhi)
395+
end if
396+
390397
if ( l_mag_nl ) then
391398

392399
if ( nBc == 0 .and. nR>n_r_LCR ) then

src/phys_param.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ module physical_parameters
5454
real(cp) :: ViscHeatFac ! Prefactor for viscous heating: :math:`Di\,Pr/Ra`
5555
real(cp) :: OhmLossFac ! Prefactor for Ohmic heating: :math:`Di\,Pr/(Ra\,E\,Pm^2)`
5656
real(cp) :: DissNb ! Dissipation number
57+
real(cp) :: gamma ! buoyant thermal expasion coefficient
5758
real(cp) :: ThExpNb ! Thermal expansion * temperature :math:`\alpha_0 T_0`
5859
real(cp) :: GrunNb ! Grüneisen paramater :math:`\Gamma=(\gamma-1)/\alpha T`
5960
real(cp) :: epsS ! Deviation from the adiabat

0 commit comments

Comments
 (0)