@@ -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
0 commit comments