source: trunk/LMDZ.VENUS/libf/phyvenus/plasmaphys_venus_mod.F90 @ 3461

Last change on this file since 3461 was 3035, checked in by amartinez, 15 months ago

======= VENUS PCM ===============

COMMIT BY ANTOINE MARTINEZ

Implementation of vertical ambipolar diffusion in physics

=================================

NEW KEYWORD OF PHYSIQ.DEF

=================================

NEW VERSION OF "physiq.def"

  • deftank/physiq-96x96x90-chemistry-IONOSPHERE-IONDIFF.def
  • ok_iondiff: keyword supposed to activate ion ambipolar diffusion
  • nbapp_chem: replaces nbapp_chim, in order to characterize the Number of calls to the chemistry routines (per Venusian day)

================

phyvenus

================

Iondiff_red.F

  • Calculation of the Ion Ambipolar Diffusion for 13 ions on 14:

O2+, O+, C+, N+, CO2+,
NO+, CO+, H+, H2O+, H3O+,

HCO+, N2+, OH+


The ion temperature is fixed as the half of the electron temperature
calculated in ion_h.F for the stability of the program and because the
ion temperature is lower than electron temperature.

plasmaphys_venus_mod.F90

  • parameters of the ambipolar diffusion scheme:

parameter (Pdiffion = 7.0D-4) ! pressure in Pa below which ion diffusion is computed
parameter (naltvert = 168) ! number of level on the altimetric subgrid
parameter (nsubvert = 24000) ! ptimephysiq/nsubvert - minimum sub-timestep allowed
parameter ( nsubmin = 40) ! ptimephysiq/nsubmin - maximum sub-timestep allowed

physic_mod.F

  • nbapp_chem is not fixed anymore here but deftank/in physiq.def
  • Ambipolar diffusion activated if (ok_iondiff) is true

conf_phys.f90

  • add ok_iondiff as parameters to read from physiq.def file set to .false. by default
  • add nbapp_chem as parameters to characterize the Number of calls to the chemistry routines (per Venusian day) instead of be fixed in physic_mod.F

to read from physiq.def file set to 24000 by default

cleshphys.h

  • added ok_iondiff & nbapp_chem in COMMON/clesphys_l/
  • removed nbapp_chim

phytrac_chemistry.F

  • Added security in the calculation of the sza_local in order to avoid the rare case where the |range| is above 1
File size: 4.0 KB
Line 
1MODULE plasmaphys_venus_mod
2
3!       COMMON/com_plasma/
4 
5IMPLICIT NONE
6
7!       LOGICAL :: plasma
8!       LOGICAL :: isoT     
9       !INTEGER :: ndiffions    ! nombre d'ions decrit
10       INTEGER :: nsubstep     ! nombre de sous pas de temps pour le calcul des tendances dynamiques
11       INTEGER :: naltvert     ! nombre de points sur la grille altitude pour dynamique verticale
12       INTEGER :: nsubvert     ! nombre de sous pas de temps maximal pour dynamique verticale
13       INTEGER :: nsubmin      ! nombre de sous pas de temps minimal pour dynamique verticale
14!       INTEGER :: iappvert     ! periode appel de dynamique verticale
15       !INTEGER :: iz_vertplasma! vertical index above which ion diffusion is computed
16!       INTEGER :: irun         ! numero de simulation
17!       INTEGER nspecies     ! number of molecular species (different from nqmx if active dust included)
18!       REAL :: qcharge,muvide,preffplasma,masseU,melec                     &
19!     & ,dtplasma,Freqklim,kbolt
20       REAL*8 :: Pdiffion
21       REAL*8 :: qcharge,muvide
22
23!       parameter (ndiffions = 8)
24!       parameter (Pdiffion  = 7.D-4) ! pressure in Pa below which ion diffusion is computed
25!        ORIGINE -------------------------------
26       !parameter (naltvert  = 28)
27       !parameter (nsubvert  = 12000)   ! ptimestep/nsubvert
28       !parameter ( nsubmin  = 80)    ! ptimestep/nsubmin
29!        STABILITY MORE5  ----------------------------------
30       !parameter (Pdiffion  = 7.0D-4) ! pressure in Pa below which ion diffusion is computed
31       !parameter (naltvert  = 28*3)
32       !parameter (nsubvert  = 12000)   ! ptimestep/nsubvert
33       !parameter ( nsubmin  = 40)    ! ptimestep/nsubmin
34!        STABILITY MORE6  ----------------------------------
35       !parameter (Pdiffion  = 7.0D-4) ! pressure in Pa below which ion diffusion is computed
36       !parameter (naltvert  = 28*3*2)
37       !parameter (nsubvert  = 12000*3)   ! ptimestep/nsubvert
38       !parameter ( nsubmin  = 40)    ! ptimestep/nsubmin
39!       CURRENT BEST TIME CALCULATION  ----------------------------------
40       parameter (Pdiffion  = 7.0D-4) ! pressure in Pa below which ion diffusion is computed
41       parameter (naltvert  = 168)    ! number of level on the altimetric subgrid
42       parameter (nsubvert  = 24000)  ! ptimephysiq/nsubvert - minimum sub-timestep allowed
43       parameter ( nsubmin  = 40)     ! ptimephysiq/nsubmin  - maximum sub-timestep allowed
44
45
46       !parameter (iappvert  = 500)
47       parameter (qcharge=1.602176487D-19)
48       !parameter (kbolt=1.3806504d-23)
49       parameter (muvide=1.2566371D-6)
50       !parameter (preffplasma=1.e-10)
51       !parameter (masseU=1.660538782e-27)
52       !parameter (melec=9.1093826e-31)
53!       parameter (isoT=.TRUE.)
54
55!! OLDER CODE BELOW ======================================================
56       
57! Ions parameter
58       
59       !INTEGER itrans(ndynions)                  ! global index of fluid ions
60       !INTEGER etrans(1)                         ! index of electron   
61       !INTEGER,DIMENSION(:),ALLOCATABLE :: iplasma ! = 0 ou 1 si traceur ou fluide
62       !CHARACTER(LEN=20) ionstrans(ndynions)
63       !CHARACTER(LEN=20) electrans(1) 
64       !REAL,DIMENSION(:),ALLOCATABLE ::  Mtraceur
65       !REAL, DIMENSION(:),ALLOCATABLE :: Charge
66       !REAL Cpkabs(ndynions),cpk(ndynions),kappak(ndynions)
67       !REAL cpeabs,cpe,kappae
68
69!       parameter (ionstrans=["o2plus","oplus"])
70!       parameter (electrans=["elec"])
71
72!
73!! Dissipation parameters
74!
75!!       REAL tetaudivk,tetaurotk,tetahk,cdivuk,crotk,cdivhk   
76!        REAL,DIMENSION(:),ALLOCATABLE :: tetaudivk,tetaurotk,tetahk
77!
78!!       COMMON/com_plasma/                                               &
79!!     & ionstrans,electrans,irun,                                        &
80!!     & plasma,itrans,etrans,iplasma,Mtraceur,dtplasma,Charge,           &
81!!     & cpkabs,cpk,kappak,cpeabs,cpe,kappae
82!
83!!       COMMON/diss_plasma/tetaudivk(llp),tetaurotk(llp),tetahk(llp)
84!               
85
86END MODULE
87
88!-----------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.