Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions src/Namelists.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ subroutine readNamelists(tscheme)
& mpi_transp,l_adv_curl,mpi_packing

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

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

if ( l_centrifuge .and. .not. &
& (l_anel .and. .not. l_isothermal .and. (index(interior_model, "NONE")/=0)) ) then
& (l_anel .and. .not. l_isothermal .and. (index(interior_model, "NONE")/=0)) .and. gamma == 0.0_cp ) then
call abortRun("This case is not implemented.")
! centrifugal acceleration implemented for anelastic polytropic background so far
end if
Expand Down Expand Up @@ -934,6 +934,7 @@ subroutine writeNamelists(n_out)
write(n_out,'('' sc ='',ES14.6,'','')') sc
write(n_out,'('' prmag ='',ES14.6,'','')') prmag
write(n_out,'('' ek ='',ES14.6,'','')') ek
write(n_out,'('' gamma ='',ES14.6,'','')') gamma
write(n_out,'('' po ='',ES14.6,'','')') po
write(n_out,'('' stef ='',ES14.6,'','')') stef
write(n_out,'('' tmelt ='',ES14.6,'','')') tmelt
Expand Down
11 changes: 9 additions & 2 deletions src/get_nl.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module grid_space_arrays_mod
use radial_functions, only: or2, orho1, beta, otemp1, visc, r, or3, &
& lambda, or4, or1
use physical_parameters, only: radratio, LFfac, n_r_LCR, prec_angle, ViscHeatFac, &
& oek, po, dilution_fac, ra, rae, opr, OhmLossFac, &
& oek, po, dilution_fac, ra, rae, gamma, opr, OhmLossFac, &
& epsPhase, phaseDiffFac, penaltyFac, tmelt
use horizontal_data, only: sinTheta, cosTheta, phi, O_sin_theta_E2, &
& cosn_theta_E2, O_sin_theta
Expand Down Expand Up @@ -369,7 +369,7 @@ subroutine get_nl(this, time, nR, nBc, lRmsCalc)
& this%vrc(:,nPhi)*cosTheta(:))
end if ! precession term required ?

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

if (l_centrifuge .and. gamma > 0) then
! ---- r^2 * (-gamma) / Ek^2 * sin(theta)^2 * T
this%CAr(:,nPhi) = -gamma * oek**2 * r(nR)**3 * sinTheta(:)**2 * this%sc(:,nPhi)
! ---- sin(theta)/r * (-gamma) / Ek^2 * sin(theta) * cos(theta) * T
this%CAt(:,nPhi) = -gamma * oek**2 * sinTheta(:)**2 * cosTheta(:) * this%sc(:,nPhi)
end if

if ( l_mag_nl ) then

if ( nBc == 0 .and. nR>n_r_LCR ) then
Expand Down
1 change: 1 addition & 0 deletions src/phys_param.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module physical_parameters
real(cp) :: ViscHeatFac ! Prefactor for viscous heating: :math:`Di\,Pr/Ra`
real(cp) :: OhmLossFac ! Prefactor for Ohmic heating: :math:`Di\,Pr/(Ra\,E\,Pm^2)`
real(cp) :: DissNb ! Dissipation number
real(cp) :: gamma ! buoyant thermal expasion coefficient
real(cp) :: ThExpNb ! Thermal expansion * temperature :math:`\alpha_0 T_0`
real(cp) :: GrunNb ! Grüneisen paramater :math:`\Gamma=(\gamma-1)/\alpha T`
real(cp) :: epsS ! Deviation from the adiabat
Expand Down