Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gyacomo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Cyril David Hoffmann
Gyacomo
Commits
86d82f99
Commit
86d82f99
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
added scaled spatial hyperdiffusion
parent
bce3118a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/grid_mod.F90
+7
-4
7 additions, 4 deletions
src/grid_mod.F90
src/moments_eq_rhs_mod.F90
+5
-4
5 additions, 4 deletions
src/moments_eq_rhs_mod.F90
with
12 additions
and
8 deletions
src/grid_mod.F90
+
7
−
4
View file @
86d82f99
...
@@ -43,7 +43,8 @@ MODULE grid
...
@@ -43,7 +43,8 @@ MODULE grid
REAL
(
dp
),
DIMENSION
(:),
ALLOCATABLE
,
PUBLIC
::
zarray_full
REAL
(
dp
),
DIMENSION
(:),
ALLOCATABLE
,
PUBLIC
::
zarray_full
! local z weights for computing simpson rule
! local z weights for computing simpson rule
INTEGER
,
DIMENSION
(:),
ALLOCATABLE
,
PUBLIC
::
zweights_SR
INTEGER
,
DIMENSION
(:),
ALLOCATABLE
,
PUBLIC
::
zweights_SR
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
deltax
,
deltay
,
deltaz
,
inv_deltaz
,
diff_dz_coeff
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
deltax
,
deltay
,
deltaz
,
inv_deltaz
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
diff_kx_coeff
,
diff_ky_coeff
,
diff_dz_coeff
INTEGER
,
PUBLIC
,
PROTECTED
::
ixs
,
ixe
,
iys
,
iye
,
izs
,
ize
INTEGER
,
PUBLIC
,
PROTECTED
::
ixs
,
ixe
,
iys
,
iye
,
izs
,
ize
INTEGER
,
PUBLIC
,
PROTECTED
::
izgs
,
izge
! ghosts
INTEGER
,
PUBLIC
,
PROTECTED
::
izgs
,
izge
! ghosts
LOGICAL
,
PUBLIC
,
PROTECTED
::
SG
=
.true.
! shifted grid flag
LOGICAL
,
PUBLIC
,
PROTECTED
::
SG
=
.true.
! shifted grid flag
...
@@ -292,6 +293,7 @@ CONTAINS
...
@@ -292,6 +293,7 @@ CONTAINS
deltaky
=
2._dp
*
PI
/
Ly
deltaky
=
2._dp
*
PI
/
Ly
ky_max
=
Nky
*
deltaky
ky_max
=
Nky
*
deltaky
ky_min
=
deltaky
ky_min
=
deltaky
diff_ky_coeff
=
(
1._dp
/
ky_max
)
**
4
ENDIF
ENDIF
! Build the full grids on process 0 to diagnose it without comm
! Build the full grids on process 0 to diagnose it without comm
ALLOCATE
(
kyarray_full
(
1
:
Nky
))
ALLOCATE
(
kyarray_full
(
1
:
Nky
))
...
@@ -370,9 +372,10 @@ CONTAINS
...
@@ -370,9 +372,10 @@ CONTAINS
kxarray_full
(
1
)
=
0._dp
kxarray_full
(
1
)
=
0._dp
local_kxmax
=
0._dp
local_kxmax
=
0._dp
ELSE
! Build apprpopriate grid
ELSE
! Build apprpopriate grid
deltakx
=
2._dp
*
PI
/
Lx
deltakx
=
2._dp
*
PI
/
Lx
kx_max
=
(
Ny
/
2
)
*
deltakx
kx_max
=
(
Nkx
/
2
)
*
deltakx
kx_min
=
deltakx
kx_min
=
deltakx
diff_kx_coeff
=
(
1._dp
/
kx_max
)
**
4
! Creating a grid ordered as dk*(0 1 2 3 -2 -1)
! Creating a grid ordered as dk*(0 1 2 3 -2 -1)
local_kxmax
=
0._dp
local_kxmax
=
0._dp
DO
ikx
=
ikxs
,
ikxe
DO
ikx
=
ikxs
,
ikxe
...
...
This diff is collapsed.
Click to expand it.
src/moments_eq_rhs_mod.F90
+
5
−
4
View file @
86d82f99
...
@@ -110,8 +110,9 @@ SUBROUTINE moments_eq_rhs_e
...
@@ -110,8 +110,9 @@ SUBROUTINE moments_eq_rhs_e
! Drives (density + temperature gradients)
! Drives (density + temperature gradients)
-
i_ky
*
Tphi
&
-
i_ky
*
Tphi
&
! Numerical perpendicular hyperdiffusion (totally artificial, for stability purpose)
! Numerical perpendicular hyperdiffusion (totally artificial, for stability purpose)
! - (mu_x*kx**4 + mu_y*ky**4)*moments_e(ip,ij,iky,ikx,iz,updatetlevel) &
-
mu_x
*
diff_kx_coeff
*
kx
**
4
*
moments_e
(
ip
,
ij
,
iky
,
ikx
,
iz
,
updatetlevel
)
&
-
(
mu_x
*
kx
**
2
+
mu_y
*
ky
**
2
)
*
moments_e
(
ip
,
ij
,
iky
,
ikx
,
iz
,
updatetlevel
)
&
-
mu_y
*
diff_ky_coeff
*
ky
**
4
*
moments_e
(
ip
,
ij
,
iky
,
ikx
,
iz
,
updatetlevel
)
&
! - (mu_x*kx**2 + mu_y*ky**2)*moments_e(ip,ij,iky,ikx,iz,updatetlevel) &
! Numerical parallel hyperdiffusion "+ (mu_z*kz**4)" see Pueschel 2010 (eq 25)
! Numerical parallel hyperdiffusion "+ (mu_z*kz**4)" see Pueschel 2010 (eq 25)
+
mu_z
*
diff_dz_coeff
*
ddz4_Nepj
(
ip
,
ij
,
iky
,
ikx
,
iz
)
&
+
mu_z
*
diff_dz_coeff
*
ddz4_Nepj
(
ip
,
ij
,
iky
,
ikx
,
iz
)
&
! Collision term
! Collision term
...
@@ -241,8 +242,8 @@ SUBROUTINE moments_eq_rhs_i
...
@@ -241,8 +242,8 @@ SUBROUTINE moments_eq_rhs_i
! Drives (density + temperature gradients)
! Drives (density + temperature gradients)
-
i_ky
*
Tphi
&
-
i_ky
*
Tphi
&
! Numerical hyperdiffusion (totally artificial, for stability purpose)
! Numerical hyperdiffusion (totally artificial, for stability purpose)
!
- (mu_x*kx**4 + mu_y*ky**4)*moments_i(ip,ij,iky,ikx,iz,updatetlevel) &
-
(
mu_x
*
kx
**
4
+
mu_y
*
ky
**
4
)
*
moments_i
(
ip
,
ij
,
iky
,
ikx
,
iz
,
updatetlevel
)
&
-
(
mu_x
*
kx
**
2
+
mu_y
*
ky
**
2
)
*
moments_i
(
ip
,
ij
,
iky
,
ikx
,
iz
,
updatetlevel
)
&
!
- (mu_x*kx**2 + mu_y*ky**2)*moments_i(ip,ij,iky,ikx,iz,updatetlevel) &
! Numerical parallel hyperdiffusion "+ (mu_z*kz**4)"
! Numerical parallel hyperdiffusion "+ (mu_z*kz**4)"
+
mu_z
*
diff_dz_coeff
*
ddz4_Nipj
(
ip
,
ij
,
iky
,
ikx
,
iz
)
&
+
mu_z
*
diff_dz_coeff
*
ddz4_Nipj
(
ip
,
ij
,
iky
,
ikx
,
iz
)
&
! Collision term
! Collision term
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment