Skip to content

Commit e7eb36d

Browse files
committed
TEHD Implementation in MagIC
Add the dielectrophoretic force in MagIC using a temperature invarient electric field. The mode currently availavble is mode 1 with enables convection only. The electric Rayleigh number RaE (rae) controls the amount of electric buoyancy.
1 parent 0546d6c commit e7eb36d

5 files changed

Lines changed: 28 additions & 6 deletions

File tree

src/Namelists.f90

Lines changed: 4 additions & 2 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,raxi,pr,sc,prmag,ek,epsc0,epscxi0,radratio,Bn, &
80+
& ra,rae,raxi,pr,sc,prmag,ek,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, &
@@ -323,6 +323,7 @@ subroutine readNamelists(tscheme)
323323
l_AB1 =.false.
324324
l_bridge_step=.true.
325325
l_onset =.false.
326+
l_ehd_dep=.true.
326327

327328
if ( mode == 1 ) then
328329
!-- Only convection:
@@ -427,7 +428,7 @@ subroutine readNamelists(tscheme)
427428
l_chemical_conv = .false.
428429
end if
429430

430-
if ( ra == 0.0_cp ) l_heat=.false.
431+
if ( ra == 0.0_cp .and. rae == 0.0_cp ) l_heat=.false.
431432

432433
if ( ek < 0.0_cp ) l_non_rot= .true.
433434
if ( l_non_rot ) then
@@ -928,6 +929,7 @@ subroutine writeNamelists(n_out)
928929

929930
write(n_out,*) "&phys_param"
930931
write(n_out,'('' ra ='',ES14.6,'','')') ra
932+
write(n_out,'('' rae ='',ES14.6,'','')') rae
931933
write(n_out,'('' raxi ='',ES14.6,'','')') raxi
932934
write(n_out,'('' pr ='',ES14.6,'','')') pr
933935
write(n_out,'('' sc ='',ES14.6,'','')') sc

src/get_nl.f90

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ module grid_space_arrays_mod
2222
use truncation, only: n_phi_max, nlat_padded
2323
use radial_functions, only: or2, orho1, beta, otemp1, visc, r, or3, &
2424
& lambda, or4, or1
25-
use physical_parameters, only: LFfac, n_r_LCR, prec_angle, ViscHeatFac, &
26-
& oek, po, dilution_fac, ra, opr, OhmLossFac, &
25+
use physical_parameters, only: radratio, LFfac, n_r_LCR, prec_angle, ViscHeatFac, &
26+
& oek, po, dilution_fac, ra, rae, 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
3030
use parallel_mod, only: get_openmp_blocks
3131
use constants, only: two, third, one
3232
use logic, only: l_conv_nl, l_heat_nl, l_mag_nl, l_anel, l_mag_LF, l_adv_curl, &
33-
& l_chemical_conv, l_precession, l_centrifuge, l_phase_field
33+
& l_chemical_conv, l_precession, l_centrifuge, l_phase_field, l_ehd_dep
3434

3535
implicit none
3636

@@ -46,6 +46,7 @@ module grid_space_arrays_mod
4646
real(cp), allocatable :: VSr(:,:), VSt(:,:), VSp(:,:)
4747
real(cp), allocatable :: VXir(:,:), VXit(:,:), VXip(:,:)
4848
real(cp), allocatable :: heatTerms(:,:), phiTerms(:,:)
49+
real(cp), allocatable :: DEPFr(:,:)
4950

5051
!----- Fields calculated from these help arrays by legtf:
5152
real(cp), allocatable :: vrc(:,:), vtc(:,:), vpc(:,:)
@@ -182,6 +183,12 @@ subroutine initialize(this)
182183
bytes_allocated=bytes_allocated+2*n_phi_max*nlat_padded*SIZEOF_DEF_REAL
183184
end if
184185

186+
if ( l_ehd_dep ) then
187+
allocate( this%DEPFr(nlat_padded,n_phi_max) )
188+
this%DEPFr(:,:)=0.0_cp
189+
bytes_allocated=bytes_allocated + 1*n_phi_max*nlat_padded*SIZEOF_DEF_REAL
190+
end if
191+
185192
end subroutine initialize
186193
!----------------------------------------------------------------------------
187194
subroutine finalize(this)
@@ -195,6 +202,7 @@ subroutine finalize(this)
195202
deallocate( this%VxBr, this%VxBt, this%VxBp, this%VSr, this%VSt, this%VSp )
196203
if ( l_chemical_conv ) deallocate( this%VXir, this%VXit, this%VXip )
197204
if ( l_precession ) deallocate( this%PCr, this%PCt, this%PCp )
205+
if ( l_ehd_dep ) deallocate( this%DEPFr )
198206
if ( l_centrifuge ) deallocate( this%CAr, this%CAt )
199207
if ( l_adv_curl ) deallocate( this%cvtc, this%cvpc )
200208
if ( l_phase_field ) deallocate( this%phic, this%phiTerms )
@@ -257,6 +265,12 @@ subroutine get_nl(this, time, nR, nBc, lRmsCalc)
257265
& this%cbtc(:,nPhi)*this%brc(:,nPhi) )
258266
end if ! Lorentz force required ?
259267

268+
if ( l_ehd_dep .and. (nBc == 0 .or. lRmsCalc) .and. nR>n_r_LCR ) then
269+
!------ Get the dielectrophoretic force:
270+
!---- RaE * eta**2 / (1-eta)**4 * Sc / r**5
271+
this%DEPFr(:,nPhi)= rae * opr * radratio**2/(1.0D0-radratio)**4 * this%sc(:,nPhi) * or3(nR)
272+
end if ! DEP force required ?
273+
260274
if ( l_conv_nl .and. (nBc == 0 .or. lRmsCalc) ) then
261275

262276
if ( l_adv_curl ) then ! Advection is \curl{u} \times u

src/logic.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module logic
7272
logical :: l_perpPar ! Switch for calculation of of kinetic energy perpendicular+parallel to the rotation axis
7373
logical :: l_LCR ! Switch for zero electrical conductivity beyond r_LCR
7474
logical :: lVerbose ! Switch for detailed information about run progress
75+
logical :: l_ehd_dep ! Switch for dilectrophoretic force
7576

7677
logical :: l_PressGraph ! Store pressure in graphic files
7778

src/phys_param.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module physical_parameters
3737
!-- Dimensionless parameters:
3838
real(cp) :: radratio ! aspect ratio
3939
real(cp) :: ra ! Rayleigh number
40+
real(cp) :: rae ! Electric Rayleigh number
4041
real(cp) :: raxi ! Chemical composition-based Rayleigh number
4142
real(cp) :: sc ! Schmidt number (i.e. chemical Prandtl number)
4243
real(cp) :: ek ! Ekman number

src/rIter.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module rIter_mod
2121
& l_precession, l_centrifuge, l_adv_curl, &
2222
& l_double_curl, l_parallel_solve, l_single_matrix,&
2323
& l_temperature_diff, l_RMS, l_phase_field, &
24-
& l_onset, l_DTrMagSpec
24+
& l_onset, l_DTrMagSpec, l_ehd_dep
2525
use radial_data, only: n_r_cmb, n_r_icb, nRstart, nRstop, nRstartMag, &
2626
& nRstopMag
2727
use radial_functions, only: or2, orho1, l_R
@@ -667,6 +667,10 @@ subroutine transform_to_lm_space(this, nR, lRmsCalc, dVSrLM, dVXirLM, dphidt)
667667
this%gsa%Advr(:, nPhi)=this%gsa%Advr(:,nPhi) + this%gsa%CAr(:,nPhi)
668668
this%gsa%Advt(:, nPhi)=this%gsa%Advt(:,nPhi) + this%gsa%CAt(:,nPhi)
669669
end if
670+
671+
if ( l_ehd_dep ) then
672+
this%gsa%Advr(:, nPhi)=this%gsa%Advr(:,nPhi) + this%gsa%DEPFr(:,nPhi)
673+
end if
670674
end do
671675
!$omp end parallel
672676

0 commit comments

Comments
 (0)