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
657e60ec
Commit
657e60ec
authored
3 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
Added option to intialize a sin profile as initial state
parent
3d636b95
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/inital.F90
+14
-25
14 additions, 25 deletions
src/inital.F90
src/initial_par_mod.F90
+3
-3
3 additions, 3 deletions
src/initial_par_mod.F90
with
17 additions
and
28 deletions
src/inital.F90
+
14
−
25
View file @
657e60ec
...
...
@@ -34,6 +34,9 @@ SUBROUTINE inital
IF
(
INIT_NOISY_PHI
)
THEN
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'Init noisy phi'
CALL
init_phi
! init noisy phi_0, N_0 = 0
ELSEIF
(
INIT_ZF
.GT.
0
)
THEN
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'Init ZF phi'
CALL
init_phi
! init ZF
ELSE
IF
(
my_id
.EQ.
0
)
WRITE
(
*
,
*
)
'Init noisy moments and ghosts'
CALL
init_moments
! init noisy N_0
...
...
@@ -192,36 +195,22 @@ SUBROUTINE init_phi
ENDIF
!**** Cancel previous moments initialization
DO
ip
=
ips_e
,
ipe_e
DO
ij
=
ijs_e
,
ije_e
DO
ikr
=
ikrs
,
ikre
DO
ikz
=
ikzs
,
ikze
moments_e
(
ip
,
ij
,
ikr
,
ikz
,
:)
=
0._dp
ENDDO
ENDDO
ENDDO
ENDDO
DO
ip
=
ips_i
,
ipe_i
DO
ij
=
ijs_i
,
ije_i
DO
ikr
=
ikrs
,
ikre
DO
ikz
=
ikzs
,
ikze
moments_i
(
ip
,
ij
,
ikr
,
ikz
,
:)
=
0._dp
ENDDO
ENDDO
ENDDO
ENDDO
moments_e
=
0._dp
;
moments_i
=
0._dp
ELSEIF
(
INIT_ZF
_PHI
.GT.
0
)
THEN
ELSEIF
(
INIT_ZF
.GT.
0
)
THEN
!**** Zonal Flow initialization *******************************************
! Every mode is zero
DO
ikr
=
ikrs
,
ikre
DO
ikz
=
ikzs
,
ikze
phi
(
ikr
,
ikz
)
=
0._dp
END
DO
END
DO
phi
=
0._dp
moments_e
=
0._dp
moments_i
=
0._dp
! Except at ikr = mode number + 1, symmetry is already included since kr>=0
phi
(
INIT_ZF_PHI
+1
,
ikz_0
)
=
-
init_background
*
imagu
/
2._dp
IF
(
(
INIT_ZF
+1
.GT.
ikrs
)
.AND.
(
INIT_ZF
+1
.LT.
ikre
)
)
THEN
phi
(
INIT_ZF
+1
,
ikz_0
)
=
(
2._dp
*
PI
)
**
2
*
init_background
/
deltakr
/
deltakz
/
2._dp
ENDIF
!**** Init ZF in density
moments_e
(
1
,
1
,
INIT_ZF
+1
,
ikz_0
,:)
=
-
(
2._dp
*
PI
)
**
2
*
init_background
/
deltakr
/
deltakz
*
imagu
/
2._dp
moments_i
(
1
,
1
,
INIT_ZF
+1
,
ikz_0
,:)
=
-
(
2._dp
*
PI
)
**
2
*
init_background
/
deltakr
/
deltakz
*
imagu
/
2._dp
ELSE
! we compute phi from noisy moments and poisson
...
...
This diff is collapsed.
Click to expand it.
src/initial_par_mod.F90
+
3
−
3
View file @
657e60ec
...
...
@@ -8,7 +8,7 @@ MODULE initial_par
! Initialization through a noisy phi
LOGICAL
,
PUBLIC
,
PROTECTED
::
INIT_NOISY_PHI
=
.false.
! Initialization through a zonal flow phi
INTEGER
,
PUBLIC
,
PROTECTED
::
INIT_ZF
_PHI
=
0
INTEGER
,
PUBLIC
,
PROTECTED
::
INIT_ZF
=
0
! Initial background level
REAL
(
dp
),
PUBLIC
,
PROTECTED
::
init_background
=
0._dp
! Initial noise amplitude
...
...
@@ -39,7 +39,7 @@ CONTAINS
IMPLICIT
NONE
NAMELIST
/
INITIAL_CON
/
INIT_NOISY_PHI
NAMELIST
/
INITIAL_CON
/
INIT_ZF
_PHI
NAMELIST
/
INITIAL_CON
/
INIT_ZF
NAMELIST
/
INITIAL_CON
/
init_background
NAMELIST
/
INITIAL_CON
/
init_noiselvl
NAMELIST
/
INITIAL_CON
/
iseed
...
...
@@ -64,7 +64,7 @@ CONTAINS
CALL
attach
(
fidres
,
TRIM
(
str
),
"INIT_NOISY_PHI"
,
INIT_NOISY_PHI
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"INIT_ZF
_PHI
"
,
INIT_ZF
_PHI
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"INIT_ZF"
,
INIT_ZF
)
CALL
attach
(
fidres
,
TRIM
(
str
),
"init_background"
,
init_background
)
...
...
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