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
efffb3dc
Commit
efffb3dc
authored
4 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
sc
parent
41ec3009
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
wk/analysis_2D.m
+32
-24
32 additions, 24 deletions
wk/analysis_2D.m
wk/fort.90
+7
-7
7 additions, 7 deletions
wk/fort.90
wk/setup.m
+4
-4
4 additions, 4 deletions
wk/setup.m
with
43 additions
and
35 deletions
wk/analysis_2D.m
+
32
−
24
View file @
efffb3dc
...
@@ -27,7 +27,7 @@ dr = 2*pi/Lk; dz = 2*pi/Lk;
...
@@ -27,7 +27,7 @@ dr = 2*pi/Lk; dz = 2*pi/Lk;
Nr
=
max
(
Nkr
,
Nkz
);
Nz
=
Nr
;
Nr
=
max
(
Nkr
,
Nkz
);
Nz
=
Nr
;
r
=
dr
*
(
-
Nr
/
2
:(
Nr
/
2
-
1
));
Lr
=
max
(
r
)
-
min
(
r
);
r
=
dr
*
(
-
Nr
/
2
:(
Nr
/
2
-
1
));
Lr
=
max
(
r
)
-
min
(
r
);
z
=
dz
*
(
-
Nz
/
2
:(
Nz
/
2
-
1
));
Lz
=
max
(
z
)
-
min
(
z
);
z
=
dz
*
(
-
Nz
/
2
:(
Nz
/
2
-
1
));
Lz
=
max
(
z
)
-
min
(
z
);
[
YY
,
XX
]
=
meshgrid
(
z
,
r
);
[
ZZ
,
RR
]
=
meshgrid
(
z
,
r
);
% Analysis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Analysis %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% IFFT
% IFFT
ne
=
zeros
(
Nr
,
Nz
);
ne
=
zeros
(
Nr
,
Nz
);
...
@@ -127,22 +127,7 @@ if strcmp(OUTPUTS.write_non_lin,'.true.')
...
@@ -127,22 +127,7 @@ if strcmp(OUTPUTS.write_non_lin,'.true.')
end
end
FMT
=
'.fig'
;
save_figure
FMT
=
'.fig'
;
save_figure
%% Spectra energy
if
0
% fig = figure; FIGNAME = ['Energy_kin_KZ',sprintf('_%.2d',JOBNUM)];
% semilogy(kr(floor(end/2)+1:end),E_kin_KR(floor(end/2)+1:end),'o','DisplayName','$\sum_y\langle|ik\tilde\phi_i|^2\rangle_t$')
% hold on;
% loglog(kz(floor(end/2)+1:end),E_kin_KZ(floor(end/2)+1:end),'o','DisplayName','$\sum_x\langle|ik\tilde\phi_i|^2\rangle_t$')
% grid on; xlabel('$k$'); legend('show');
% FMT = '.fig'; save_figure
%% CFL condition
fig
=
figure
;
FIGNAME
=
[
'CFL'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
semilogy
(
Ts
,
dz
.
/
ExB
,
'-'
,
'DisplayName'
,
'$|\nabla \phi|\Delta y$'
);
hold
on
;
plot
(
Ts
,
dt
*
ones
(
1
,
numel
(
Ts
)),
'--k'
,
'DisplayName'
,
'$\Delta t$'
);
grid
on
;
xlabel
(
'$t$'
);
ylabel
(
'$\Delta t$'
);
legend
(
'show'
);
FMT
=
'.fig'
;
save_figure
%% Space-Time diagrams at z = 0
%% Space-Time diagrams at z = 0
plt
=
@
(
x
)
real
(
x
);
plt
=
@
(
x
)
real
(
x
);
fig
=
figure
;
FIGNAME
=
[
'r_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
fig
=
figure
;
FIGNAME
=
[
'r_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
...
@@ -157,7 +142,9 @@ subplot(223)% density
...
@@ -157,7 +142,9 @@ subplot(223)% density
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
phi_ST_r
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
phi_ST_r
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$r\,(z=0)$'
);
ylabel
(
'$t$'
);
title
(
'$\phi$'
);
xlabel
(
'$r\,(z=0)$'
);
ylabel
(
'$t$'
);
title
(
'$\phi$'
);
FMT
=
'.fig'
;
save_figure
FMT
=
'.fig'
;
save_figure
end
if
0
%% Space-Time diagrams at r = 0
%% Space-Time diagrams at r = 0
plt
=
@
(
x
)
real
(
x
);
plt
=
@
(
x
)
real
(
x
);
fig
=
figure
;
FIGNAME
=
[
'z_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
fig
=
figure
;
FIGNAME
=
[
'z_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
...
@@ -172,7 +159,9 @@ subplot(223)% density
...
@@ -172,7 +159,9 @@ subplot(223)% density
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
phi_ST_z
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
phi_ST_z
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$z\,(r=0)$'
);
ylabel
(
'$t$'
);
title
(
'$\phi$'
);
xlabel
(
'$z\,(r=0)$'
);
ylabel
(
'$t$'
);
title
(
'$\phi$'
);
FMT
=
'.fig'
;
save_figure
FMT
=
'.fig'
;
save_figure
end
if
0
%% Space-Time diagrams for max_kz(Real)
%% Space-Time diagrams for max_kz(Real)
plt
=
@
(
x
)
(
x
);
plt
=
@
(
x
)
(
x
);
fig
=
figure
;
FIGNAME
=
[
'kr_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
fig
=
figure
;
FIGNAME
=
[
'kr_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
...
@@ -187,7 +176,9 @@ subplot(223)% density
...
@@ -187,7 +176,9 @@ subplot(223)% density
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
PH_ST_kr
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
PH_ST_kr
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$kr$'
);
ylabel
(
'$t$'
);
title
(
'$\max_{k_z}(\textrm{Re}(\tilde\phi$))'
);
xlabel
(
'$kr$'
);
ylabel
(
'$t$'
);
title
(
'$\max_{k_z}(\textrm{Re}(\tilde\phi$))'
);
FMT
=
'.fig'
;
save_figure
FMT
=
'.fig'
;
save_figure
end
if
0
%% Space-Time diagrams at max_kr(Real)
%% Space-Time diagrams at max_kr(Real)
plt
=
@
(
x
)
(
x
);
plt
=
@
(
x
)
(
x
);
fig
=
figure
;
FIGNAME
=
[
'kz_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
fig
=
figure
;
FIGNAME
=
[
'kz_space_time_diag'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
...
@@ -202,12 +193,28 @@ subplot(223)% density
...
@@ -202,12 +193,28 @@ subplot(223)% density
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
PH_ST_kz
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
pclr
=
pcolor
(
TX
,
TY
,(
plt
(
PH_ST_kz
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$kz$'
);
ylabel
(
'$t$'
);
title
(
'$\max_{k_r}(\textrm{Re}(\tilde\phi))$'
);
xlabel
(
'$kz$'
);
ylabel
(
'$t$'
);
title
(
'$\max_{k_r}(\textrm{Re}(\tilde\phi))$'
);
FMT
=
'.fig'
;
save_figure
FMT
=
'.fig'
;
save_figure
end
if
1
%% Show frame in real space
it
=
min
(
1
,
numel
(
Ts
));
fig
=
figure
;
FIGNAME
=
[
'rz_frame'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
subplot
(
221
);
plt
=
@
(
x
)
(((
x
)));
pclr
=
pcolor
((
RR
),(
ZZ
),
plt
(
phi
(:,:,
it
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$r$'
);
ylabel
(
'$z$'
);
title
(
sprintf
(
't=%.3d'
,
Ts
(
it
)));
legend
(
'$|\hat\phi|$'
);
subplot
(
222
);
plt
=
@
(
x
)
((
x
));
pclr
=
pcolor
((
RR
),(
ZZ
),
plt
(
ni
(:,:,
it
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$r$'
);
ylabel
(
'$z$'
);
title
(
sprintf
(
't=%.3d'
,
Ts
(
it
)));
legend
(
'$|\hat n_i^{00}|$'
);
subplot
(
223
);
plt
=
@
(
x
)
((
x
));
pclr
=
pcolor
((
RR
),(
ZZ
),
plt
(
ne
(:,:,
it
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$r$'
);
ylabel
(
'$z$'
);
title
(
sprintf
(
't=%.3d'
,
Ts
(
it
)));
legend
(
'$|\hat n_e^{00}|$'
);
FMT
=
'.fig'
;
save_figure
end
if
0
if
1
%% Show frame
%% Show frame
in kspace
it
=
min
(
250
,
numel
(
Ts
));
it
=
min
(
1
,
numel
(
Ts
));
fig
=
figure
;
FIGNAME
=
[
'frame'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
fig
=
figure
;
FIGNAME
=
[
'
krkz_
frame'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
subplot
(
221
);
plt
=
@
(
x
)
fftshift
((
abs
(
x
)));
subplot
(
221
);
plt
=
@
(
x
)
fftshift
((
abs
(
x
)));
pclr
=
pcolor
(
fftshift
(
KR
),
fftshift
(
KZ
),
plt
(
PH
(:,:,
it
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
pclr
=
pcolor
(
fftshift
(
KR
),
fftshift
(
KZ
),
plt
(
PH
(:,:,
it
)));
set
(
pclr
,
'edgecolor'
,
'none'
);
colorbar
;
xlabel
(
'$k_r$'
);
ylabel
(
'$k_z$'
);
title
(
sprintf
(
't=%.3d'
,
Ts
(
it
)));
legend
(
'$|\hat\phi|$'
);
xlabel
(
'$k_r$'
);
ylabel
(
'$k_z$'
);
title
(
sprintf
(
't=%.3d'
,
Ts
(
it
)));
legend
(
'$|\hat\phi|$'
);
...
@@ -224,6 +231,7 @@ if strcmp(OUTPUTS.write_non_lin,'.true.')
...
@@ -224,6 +231,7 @@ if strcmp(OUTPUTS.write_non_lin,'.true.')
end
end
FMT
=
'.fig'
;
save_figure
FMT
=
'.fig'
;
save_figure
end
end
%%
%%
DELAY
=
0.07
;
skip_
=
10
;
DELAY
=
0.07
;
skip_
=
10
;
FRAMES
=
1
:
skip_
:
numel
(
Ts
);
FRAMES
=
1
:
skip_
:
numel
(
Ts
);
...
@@ -231,17 +239,17 @@ if 0
...
@@ -231,17 +239,17 @@ if 0
%% GIFS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% GIFS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Density electron
%% Density electron
GIFNAME
=
[
'ne'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
GIFNAME
=
[
'ne'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
FIELD
=
real
(
ne
);
X
=
XX
;
Y
=
YY
;
T
=
Ts
;
FIELD
=
real
(
ne
);
X
=
RR
;
Y
=
ZZ
;
T
=
Ts
;
FIELDNAME
=
'$n_e^{00}$'
;
XNAME
=
'$r$'
;
YNAME
=
'$z$'
;
FIELDNAME
=
'$n_e^{00}$'
;
XNAME
=
'$r$'
;
YNAME
=
'$z$'
;
create_gif
create_gif
%% Density ion
%% Density ion
GIFNAME
=
[
'ni'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
GIFNAME
=
[
'ni'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
FIELD
=
real
(
ni
);
X
=
XX
;
Y
=
YY
;
T
=
Ts
;
FIELD
=
real
(
ni
);
X
=
RR
;
Y
=
ZZ
;
T
=
Ts
;
FIELDNAME
=
'$n_i^{00}$'
;
XNAME
=
'$r$'
;
YNAME
=
'$z$'
;
FIELDNAME
=
'$n_i^{00}$'
;
XNAME
=
'$r$'
;
YNAME
=
'$z$'
;
create_gif
create_gif
%% Phi
%% Phi
GIFNAME
=
[
'phi'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
GIFNAME
=
[
'phi'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
FIELD
=
real
(
phi
);
X
=
XX
;
Y
=
YY
;
T
=
Ts
;
FIELD
=
real
(
phi
);
X
=
RR
;
Y
=
ZZ
;
T
=
Ts
;
FIELDNAME
=
'$\phi$'
;
XNAME
=
'$r$'
;
YNAME
=
'$z$'
;
FIELDNAME
=
'$\phi$'
;
XNAME
=
'$r$'
;
YNAME
=
'$z$'
;
create_gif
create_gif
%% Density electron frequency
%% Density electron frequency
...
...
This diff is collapsed.
Click to expand it.
wk/fort.90
+
7
−
7
View file @
efffb3dc
&BASIC
&BASIC
nrun = 100000000
nrun = 100000000
dt = 0.01
dt = 0.01
tmax =
3
0
tmax =
10
0
RESTART = .false.
RESTART = .false.
/
/
&GRID
&GRID
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
jmaxe = 1
jmaxe = 1
pmaxi = 0
pmaxi = 0
jmaxi = 1
jmaxi = 1
Nr =
64
Nr =
128
Lr =
1
50
Lr = 50
Nz =
64
Nz =
128
Lz =
1
50
Lz = 50
kpar = 0
kpar = 0
/
/
&OUTPUT_PAR
&OUTPUT_PAR
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
write_phi = .true.
write_phi = .true.
write_non_lin = .false.
write_non_lin = .false.
write_doubleprecision = .true.
write_doubleprecision = .true.
resfile0 = '
Turbulences_64x32
_L_
1
50_lin_P_0_J_1_nB_0.5_nN_1_nu_1e-01__mu_1e-01_'
resfile0 = '
shifted_init_128x64
_L_50_lin_P_0_J_1_nB_0.5_nN_1_nu_1e-01__mu_1e-01_'
rstfile0 = '../checkpoint/cp_
Turbulences_64x32
_L_
1
50_lin_P_0_J_1_nB_0.5_nN_1_nu_1e-01__mu_1e-01_'
rstfile0 = '../checkpoint/cp_
shifted_init_128x64
_L_50_lin_P_0_J_1_nB_0.5_nN_1_nu_1e-01__mu_1e-01_'
job2load = 0
job2load = 0
/
/
&MODEL_PAR
&MODEL_PAR
...
...
This diff is collapsed.
Click to expand it.
wk/setup.m
+
4
−
4
View file @
efffb3dc
...
@@ -13,8 +13,8 @@ ETAT = 0.0; % Temperature gradient
...
@@ -13,8 +13,8 @@ ETAT = 0.0; % Temperature gradient
MU
=
1e-1
;
% Hyper diffusivity coefficient
MU
=
1e-1
;
% Hyper diffusivity coefficient
LAMBDAD
=
0.0
;
LAMBDAD
=
0.0
;
%% GRID PARAMETERS
%% GRID PARAMETERS
N
=
64
;
% Frequency gridpoints (Nkr = N/2)
N
=
128
;
% Frequency gridpoints (Nkr = N/2)
L
=
1
50
;
% Size of the squared frequency domain
L
=
50
;
% Size of the squared frequency domain
KREQ0
=
0
;
% put kr = 0
KREQ0
=
0
;
% put kr = 0
PMAXE
=
00
;
% Highest electron Hermite polynomial degree
PMAXE
=
00
;
% Highest electron Hermite polynomial degree
JMAXE
=
01
;
% Highest '' Laguerre ''
JMAXE
=
01
;
% Highest '' Laguerre ''
...
@@ -22,13 +22,13 @@ PMAXI = 00; % Highest ion Hermite polynomial degree
...
@@ -22,13 +22,13 @@ PMAXI = 00; % Highest ion Hermite polynomial degree
JMAXI
=
01
;
% Highest '' Laguerre ''
JMAXI
=
01
;
% Highest '' Laguerre ''
KPAR
=
0.0
;
% Parellel wave vector component
KPAR
=
0.0
;
% Parellel wave vector component
%% TIME PARAMETERS
%% TIME PARAMETERS
TMAX
=
3
0.0
;
% Maximal time unit
TMAX
=
10
0.0
;
% Maximal time unit
DT
=
1e-2
;
% Time step
DT
=
1e-2
;
% Time step
SPS
=
10
;
% Sampling per time unit
SPS
=
10
;
% Sampling per time unit
RESTART
=
0
;
% To restart from last checkpoint
RESTART
=
0
;
% To restart from last checkpoint
JOB2LOAD
=
0
;
JOB2LOAD
=
0
;
%% OPTIONS
%% OPTIONS
SIMID
=
'
Turbulences
'
;
% Name of the simulation
SIMID
=
'
shifted_init
'
;
% Name of the simulation
NON_LIN
=
0
*
(
1
-
KREQ0
);
% activate non-linearity (is cancelled if KREQ0 = 1)
NON_LIN
=
0
*
(
1
-
KREQ0
);
% activate non-linearity (is cancelled if KREQ0 = 1)
CO
=
-
2
;
% Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty)
CO
=
-
2
;
% Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty)
DK
=
0
;
% Drift kinetic model (put every kernel to 1)
DK
=
0
;
% Drift kinetic model (put every kernel to 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