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
0b5d00c4
Commit
0b5d00c4
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
script update (fluxtube_growth_rate.m is not trustworthy for shearless)
parent
a4ef02c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/compute/compute_fluxtube_growth_rate.m
+2
-0
2 additions, 0 deletions
matlab/compute/compute_fluxtube_growth_rate.m
wk/lin_ITG.m
+15
-15
15 additions, 15 deletions
wk/lin_ITG.m
with
17 additions
and
15 deletions
matlab/compute/compute_fluxtube_growth_rate.m
+
2
−
0
View file @
0b5d00c4
...
@@ -32,6 +32,8 @@ for it = its+1:ite
...
@@ -32,6 +32,8 @@ for it = its+1:ite
end
end
is
=
is
+
1
;
is
=
is
+
1
;
end
end
[
kys
,
Is
]
=
sort
(
DATA
.
ky
(
ikynz
));
[
kys
,
Is
]
=
sort
(
DATA
.
ky
(
ikynz
));
linear_gr
.
OPTIONS
.
TRANGE
=
t
(
its
:
ite
);
linear_gr
.
OPTIONS
.
TRANGE
=
t
(
its
:
ite
);
...
...
This diff is collapsed.
Click to expand it.
wk/lin_ITG.m
+
15
−
15
View file @
0b5d00c4
...
@@ -23,10 +23,10 @@ K_Ne = 2.22; % ele Density '''
...
@@ -23,10 +23,10 @@ K_Ne = 2.22; % ele Density '''
K_Te
=
6.96
;
% ele Temperature '''
K_Te
=
6.96
;
% ele Temperature '''
K_Ni
=
2.22
;
% ion Density gradient drive
K_Ni
=
2.22
;
% ion Density gradient drive
K_Ti
=
6.96
;
% ion Temperature '''
K_Ti
=
6.96
;
% ion Temperature '''
SIGMA_E
=
0.05196152422706632
;
% mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
%
SIGMA_E = 0.05196152422706632; % mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
%
SIGMA_E = 0.0233380; % mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
SIGMA_E
=
0.0233380
;
% mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
KIN_E
=
0
;
% 1: kinetic electrons, 2: adiabatic electrons
KIN_E
=
0
;
% 1: kinetic electrons, 2: adiabatic electrons
BETA
=
0.0
;
% electron plasma beta
BETA
=
0.0
001
;
% electron plasma beta
%% GRID PARAMETERS
%% GRID PARAMETERS
P
=
4
;
P
=
4
;
J
=
P
/
2
;
J
=
P
/
2
;
...
@@ -34,8 +34,8 @@ PMAXE = P; % Hermite basis size of electrons
...
@@ -34,8 +34,8 @@ PMAXE = P; % Hermite basis size of electrons
JMAXE
=
J
;
% Laguerre "
JMAXE
=
J
;
% Laguerre "
PMAXI
=
P
;
% " ions
PMAXI
=
P
;
% " ions
JMAXI
=
J
;
% "
JMAXI
=
J
;
% "
NX
=
6
;
% real space x-gridpoints
NX
=
2
;
% real space x-gridpoints
NY
=
1
0
;
% '' y-gridpoints
NY
=
1
2
;
% '' y-gridpoints
LX
=
2
*
pi
/
0.8
;
% Size of the squared frequency domain
LX
=
2
*
pi
/
0.8
;
% Size of the squared frequency domain
LY
=
2
*
pi
/
0.1
;
% Size of the squared frequency domain
LY
=
2
*
pi
/
0.1
;
% Size of the squared frequency domain
NZ
=
16
;
% number of perpendicular planes (parallel grid)
NZ
=
16
;
% number of perpendicular planes (parallel grid)
...
@@ -43,18 +43,18 @@ NPOL = 1;
...
@@ -43,18 +43,18 @@ NPOL = 1;
SG
=
0
;
% Staggered z grids option
SG
=
0
;
% Staggered z grids option
NEXC
=
1
;
% To extend Lx if needed (Lx = Nexc/(kymin*shear))
NEXC
=
1
;
% To extend Lx if needed (Lx = Nexc/(kymin*shear))
%% GEOMETRY
%% GEOMETRY
%
GEOMETRY= 's-alpha';
GEOMETRY
=
's-alpha'
;
GEOMETRY
=
'miller'
;
%
GEOMETRY= 'miller';
EPS
=
0.18
;
% inverse aspect ratio
EPS
=
0.18
;
% inverse aspect ratio
Q0
=
1.4
;
% safety factor
Q0
=
1.4
;
% safety factor
SHEAR
=
0.
8
;
% magnetic shear
SHEAR
=
0.
0
;
% magnetic shear
KAPPA
=
1.0
;
% elongation
KAPPA
=
1.0
;
% elongation
DELTA
=
0.0
;
% triangularity
DELTA
=
0.0
;
% triangularity
ZETA
=
0.0
;
% squareness
ZETA
=
0.0
;
% squareness
PARALLEL_BC
=
'dirichlet'
;
%'dirichlet','periodic','shearless','disconnected'
PARALLEL_BC
=
'dirichlet'
;
%'dirichlet','periodic','shearless','disconnected'
SHIFT_Y
=
0.0
;
SHIFT_Y
=
0.0
;
%% TIME PARMETERS
%% TIME PARMETERS
TMAX
=
6
0
;
% Maximal time unit
TMAX
=
10
0
;
% Maximal time unit
DT
=
1e-2
;
% Time step
DT
=
1e-2
;
% Time step
SPS0D
=
1
;
% Sampling per time unit for 2D arrays
SPS0D
=
1
;
% Sampling per time unit for 2D arrays
SPS2D
=
-
1
;
% Sampling per time unit for 2D arrays
SPS2D
=
-
1
;
% Sampling per time unit for 2D arrays
...
@@ -90,7 +90,7 @@ INIT_BLOB = 0; WIPE_TURB = 0; ACT_ON_MODES = 0;
...
@@ -90,7 +90,7 @@ INIT_BLOB = 0; WIPE_TURB = 0; ACT_ON_MODES = 0;
MU_X
=
MU
;
%
MU_X
=
MU
;
%
MU_Y
=
MU
;
%
MU_Y
=
MU
;
%
N_HD
=
4
;
N_HD
=
4
;
MU_Z
=
2
.0
;
%
MU_Z
=
1
.0
;
%
MU_P
=
0.0
;
%
MU_P
=
0.0
;
%
MU_J
=
0.0
;
%
MU_J
=
0.0
;
%
LAMBDAD
=
0.0
;
LAMBDAD
=
0.0
;
...
@@ -107,9 +107,9 @@ setup
...
@@ -107,9 +107,9 @@ setup
if
RUN
if
RUN
% system(['cd ../results/',SIMID,'/',PARAMS,'/; time mpirun -np 4 ',gyacomodir,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; time mpirun -np 4 ',gyacomodir,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 4 ',gyacomodir,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 4 ',gyacomodir,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
system
([
'cd ../results/'
,
SIMID
,
'/'
,
PARAMS
,
'/; mpirun -np 2 '
,
gyacomodir
,
'bin/'
,
EXECNAME
,
' 1 2 1 0; cd ../../../wk'
])
%
system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 2 ',gyacomodir,'bin/',EXECNAME,' 1 2 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 6 ',gyacomodir,'bin/',EXECNAME,' 1 2 3 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 6 ',gyacomodir,'bin/',EXECNAME,' 1 2 3 0; cd ../../../wk'])
%
system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 4 ',gyacomodir,'bin/',EXECNAME,' 1 2 2 0; cd ../../../wk'])
system
([
'cd ../results/'
,
SIMID
,
'/'
,
PARAMS
,
'/; mpirun -np 4 '
,
gyacomodir
,
'bin/'
,
EXECNAME
,
' 1 2 2 0; cd ../../../wk'
])
end
end
%% Load results
%% Load results
...
@@ -121,10 +121,10 @@ JOBNUMMIN = 00; JOBNUMMAX = 01;
...
@@ -121,10 +121,10 @@ JOBNUMMIN = 00; JOBNUMMAX = 01;
data
=
compile_results
(
LOCALDIR
,
JOBNUMMIN
,
JOBNUMMAX
);
%Compile the results from first output found to JOBNUMMAX if existing
data
=
compile_results
(
LOCALDIR
,
JOBNUMMIN
,
JOBNUMMAX
);
%Compile the results from first output found to JOBNUMMAX if existing
%% Short analysis
%% Short analysis
if
1
if
0
%% linear growth rate (adapted for 2D zpinch and fluxtube)
%% linear growth rate (adapted for 2D zpinch and fluxtube)
options
.
TRANGE
=
[
0.5
1
]
*
data
.
Ts3D
(
end
);
options
.
TRANGE
=
[
0.5
1
]
*
data
.
Ts3D
(
end
);
options
.
NPLOTS
=
2
;
% 1 for only growth rate and error, 2 for omega local evolution, 3 for plot according to z
options
.
NPLOTS
=
3
;
% 1 for only growth rate and error, 2 for omega local evolution, 3 for plot according to z
options
.
GOK
=
0
;
%plot 0: gamma 1: gamma/k 2: gamma^2/k^3
options
.
GOK
=
0
;
%plot 0: gamma 1: gamma/k 2: gamma^2/k^3
lg
=
compute_fluxtube_growth_rate
(
data
,
options
);
lg
=
compute_fluxtube_growth_rate
(
data
,
options
);
[
gmax
,
kmax
]
=
max
(
lg
.
g_ky
(:,
end
));
[
gmax
,
kmax
]
=
max
(
lg
.
g_ky
(:,
end
));
...
@@ -170,7 +170,7 @@ options.kzky = 0;
...
@@ -170,7 +170,7 @@ options.kzky = 0;
[
lg
,
fig
]
=
compute_3D_zpinch_growth_rate
(
data
,
trange
,
options
);
[
lg
,
fig
]
=
compute_3D_zpinch_growth_rate
(
data
,
trange
,
options
);
save_figure
(
data
,
fig
)
save_figure
(
data
,
fig
)
end
end
if
0
if
1
%% Mode evolution
%% Mode evolution
options
.
NORMALIZED
=
0
;
options
.
NORMALIZED
=
0
;
options
.
K2PLOT
=
1
;
options
.
K2PLOT
=
1
;
...
...
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