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
243d1e4e
Commit
243d1e4e
authored
2 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
save
parent
f6c793cb
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
matlab/compute/mode_growth_meter.m
+7
-5
7 additions, 5 deletions
matlab/compute/mode_growth_meter.m
wk/analysis_gyacomo.m
+4
-4
4 additions, 4 deletions
wk/analysis_gyacomo.m
wk/header_3D_results.m
+4
-3
4 additions, 3 deletions
wk/header_3D_results.m
wk/lin_ITG.m
+13
-13
13 additions, 13 deletions
wk/lin_ITG.m
with
28 additions
and
25 deletions
matlab/compute/mode_growth_meter.m
+
7
−
5
View file @
243d1e4e
...
...
@@ -71,7 +71,8 @@ for i = 1:2
amp
(
i_
)
=
gr
(
2
);
i_
=
i_
+
1
;
end
mod2plot
=
[
2
:
OPTIONS
.
NMODES
+
1
];
clr_
=
jet
(
numel
(
mod2plot
));
%plot
subplot
(
2
,
3
,
1
+
3
*
(
i
-
1
))
[
YY
,
XX
]
=
meshgrid
(
t
,
fftshift
(
k
));
...
...
@@ -82,9 +83,8 @@ for i = 1:2
title
(
MODESTR
)
subplot
(
2
,
3
,
2
+
3
*
(
i
-
1
))
mod2plot
=
[
2
:
OPTIONS
.
NMODES
+
1
];
for
i_
=
mod2plot
semilogy
(
t
,
plt
(
field
,
MODES
(
i_
)));
hold
on
;
for
i_
=
1
:
numel
(
mod2plot
)
semilogy
(
t
,
plt
(
field
,
MODES
(
mod2plot
(
i_
))),
'color'
,
clr_
(
i_
,:));
hold
on
;
% semilogy(t,exp(gamma(i_).*t+amp(i_)),'--k')
end
if
MODES_SELECTOR
==
2
...
...
@@ -96,7 +96,9 @@ for i = 1:2
subplot
(
2
,
3
,
3
+
3
*
(
i
-
1
))
plot
(
k
(
MODES
),
gamma
);
hold
on
;
plot
(
k
(
MODES
(
mod2plot
)),
gamma
(
mod2plot
),
'x'
)
for
i_
=
1
:
numel
(
mod2plot
)
plot
(
k
(
MODES
(
mod2plot
(
i_
))),
gamma
(
mod2plot
(
i_
)),
'x'
,
'color'
,
clr_
(
i_
,:))
end
if
MODES_SELECTOR
==
2
plot
(
k
(
ikzf
),
gamma
(
ikzf
),
'ok'
);
end
...
...
This diff is collapsed.
Click to expand it.
wk/analysis_gyacomo.m
+
4
−
4
View file @
243d1e4e
...
...
@@ -62,9 +62,9 @@ if 0
% Options
options
.
INTERP
=
1
;
options
.
POLARPLOT
=
0
;
%
options.NAME = '\phi';
options
.
NAME
=
'\phi'
;
% options.NAME = '\omega_z';
options
.
NAME
=
'N_i^{00}'
;
%
options.NAME = 'N_i^{00}';
% options.NAME = 'v_x';
% options.NAME = 'n_i^{NZ}';
% options.NAME = '\Gamma_x';
...
...
@@ -189,11 +189,11 @@ end
if
0
%% Mode evolution
options
.
NORMALIZED
=
1
;
options
.
NORMALIZED
=
0
;
options
.
K2PLOT
=
[
0.1
0.5
1.0
2.0
6.0
];
options
.
TIME
=
[
00
:
1200
];
options
.
NMA
=
1
;
options
.
NMODES
=
5
;
options
.
NMODES
=
30
;
options
.
iz
=
'avg'
;
fig
=
mode_growth_meter
(
data
,
options
);
save_figure
(
data
,
fig
,
'.png'
)
...
...
This diff is collapsed.
Click to expand it.
wk/header_3D_results.m
+
4
−
3
View file @
243d1e4e
...
...
@@ -34,7 +34,7 @@ gyacomodir = '/home/ahoffman/gyacomo/';
% resdir = 'CBC/128x64x16x5x3';
% resdir = 'CBC/96x96x16x3x2_Nexc_6';
% resdir = 'CBC/128x96x16x3x2';
%
resdir = 'CBC/192x96x16x3x2';
resdir
=
'CBC/192x96x16x3x2'
;
% resdir = 'CBC/192x96x24x13x7';
% resdir = 'CBC/kT_11_128x64x16x5x3';
% resdir = 'CBC/kT_9_256x128x16x3x2';
...
...
@@ -62,10 +62,11 @@ gyacomodir = '/home/ahoffman/gyacomo/';
% resdir = 'testcases/miller_example';
% resdir = 'Miller/128x256x3x2_CBC_dt_5e-3';
%% CBC Miller
resdir
=
'GCM_CBC/daint/Miller_GX_comparison'
;
% resdir = 'GCM_CBC/daint/Miller_GX_comparison';
% resdir = 'GCM_CBC/daint/Salpha_GX_comparison';
%% RK3
% resdir = 'dbg/SSPx_RK3_test';
% resdir = 'dbg/SSPx_RK3_test/RK4';
%
resdir = ['results/',resdir];
resdir
=
[
'
gyacomo_outputs/
results/'
,
resdir
];
JOBNUMMIN
=
00
;
JOBNUMMAX
=
10
;
run
analysis_gyacomo
This diff is collapsed.
Click to expand it.
wk/lin_ITG.m
+
13
−
13
View file @
243d1e4e
...
...
@@ -3,8 +3,8 @@
% from matlab framework. It is meant to run only small problems in linear
% for benchmark and debugging purpose since it makes matlab "busy"
%
%
SIMID = 'lin_ITG'; % Name of the simulation
SIMID
=
'dbg'
;
% Name of the simulation
SIMID
=
'lin_ITG'
;
% Name of the simulation
%
SIMID = 'dbg'; % Name of the simulation
RUN
=
1
;
% To run or just to load
addpath
(
genpath
(
'../matlab'
))
% ... add
default_plots_options
...
...
@@ -34,11 +34,11 @@ PMAXE = P; % Hermite basis size of electrons
JMAXE
=
J
;
% Laguerre "
PMAXI
=
P
;
% " ions
JMAXI
=
J
;
% "
NX
=
20
;
% real space x-gridpoints
NY
=
20
;
% '' y-gridpoints
NX
=
8
;
% real space x-gridpoints
NY
=
16
;
% '' y-gridpoints
LX
=
2
*
pi
/
0.8
;
% Size of the squared frequency domain
LY
=
2
*
pi
/
0.05
;
% Size of the squared frequency domain
NZ
=
32
;
% number of perpendicular planes (parallel grid)
NZ
=
16
;
% number of perpendicular planes (parallel grid)
NPOL
=
1
;
SG
=
0
;
% Staggered z grids option
%% GEOMETRY
...
...
@@ -49,14 +49,14 @@ SHEAR = 0.8; % magnetic shear
KAPPA
=
1.0
;
% elongation
DELTA
=
0.0
;
% triangularity
ZETA
=
0.0
;
% squareness
NEXC
=
1
;
% To extend Lx if needed (Lx = Nexc/(kymin*shear))
NEXC
=
0
;
% To extend Lx if needed (Lx = Nexc/(kymin*shear))
EPS
=
0.18
;
% inverse aspect ratio
%% TIME PARMETERS
TMAX
=
2
0
;
% Maximal time unit
TMAX
=
6
0
;
% Maximal time unit
DT
=
1e-2
;
% Time step
SPS0D
=
1
;
% Sampling per time unit for 2D arrays
SPS2D
=
-
1
;
% Sampling per time unit for 2D arrays
SPS3D
=
5
;
% Sampling per time unit for 2D arrays
SPS3D
=
2
;
% Sampling per time unit for 2D arrays
SPS5D
=
1
/
5
;
% Sampling per time unit for 5D arrays
SPSCP
=
0
;
% Sampling per time unit for checkpoints
JOB2LOAD
=
-
1
;
...
...
@@ -72,7 +72,7 @@ CLOS = 0; % Closure model (0: =0 truncation, 1: v^Nmax closure (p+2j<=Pmax)
NL_CLOS
=
0
;
% nonlinear closure model (-2:nmax=jmax; -1:nmax=jmax-j; >=0:nmax=NL_CLOS)
KERN
=
0
;
% Kernel model (0 : GK)
INIT_OPT
=
'mom00'
;
% Start simulation with a noisy mom00/phi/allmom
NUMERICAL_SCHEME
=
'RK
3
'
;
% RK2,SSPx_RK2,RK3,SSP_RK3,SSPx_RK3,IMEX_SSP2,ARK2,RK4,DOPRI5
NUMERICAL_SCHEME
=
'RK
4
'
;
% RK2,SSPx_RK2,RK3,SSP_RK3,SSPx_RK3,IMEX_SSP2,ARK2,RK4,DOPRI5
%% OUTPUTS
W_DOUBLE
=
1
;
W_GAMMA
=
1
;
W_HF
=
1
;
...
...
@@ -106,8 +106,8 @@ if RUN
% system(['cd ../results/',SIMID,'/',PARAMS,'/; time mpirun -np 4 ',HELAZDIR,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 4 ',HELAZDIR,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 1 ',HELAZDIR,'bin/',EXECNAME,' 1 1 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 ',HELAZDIR,'bin/',EXECNAME,' 1 6 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 '
,
HELAZDIR
,
'bin/'
,
EXECNAME
,
' 1 6 1 0; cd ../../../wk'
])
end
%% Load results
...
...
@@ -115,7 +115,7 @@ end
filename
=
[
SIMID
,
'/'
,
PARAMS
,
'/'
];
LOCALDIR
=
[
gyacomodir
,
'results/'
,
filename
,
'/'
];
% Load outputs from jobnummin up to jobnummax
JOBNUMMIN
=
00
;
JOBNUMMAX
=
0
0
;
JOBNUMMIN
=
00
;
JOBNUMMAX
=
0
1
;
data
=
compile_results
(
LOCALDIR
,
JOBNUMMIN
,
JOBNUMMAX
);
%Compile the results from first output found to JOBNUMMAX if existing
%% Short analysis
...
...
@@ -174,7 +174,7 @@ options.NORMALIZED = 0;
options
.
K2PLOT
=
1
;
options
.
TIME
=
[
0
:
1000
];
options
.
NMA
=
1
;
options
.
NMODES
=
1
;
options
.
NMODES
=
1
6
;
options
.
iz
=
'avg'
;
fig
=
mode_growth_meter
(
data
,
options
);
save_figure
(
data
,
fig
,
'.png'
)
...
...
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