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
8458c0bf
Commit
8458c0bf
authored
4 years ago
by
Antoine Cyril David Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
implemented a new method to compute radial particle flux
parent
44c272cc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wk/analysis_2D.m
+40
-1
40 additions, 1 deletion
wk/analysis_2D.m
with
40 additions
and
1 deletion
wk/analysis_2D.m
+
40
−
1
View file @
8458c0bf
...
...
@@ -60,6 +60,16 @@ for it = 1:numel(Ts2D)
dzphi
(:,:,
it
)
=
real
(
fftshift
(
ifft2
(
1
i
*
KZ
.*
(
PH_
),
Nr
,
Nz
)));
end
% Building a version of phi only 5D sampling times
PHI_Ts5D
=
zeros
(
Nkr
,
Nkz
,
Ns5D
);
err
=
0
;
for
it
=
1
:
numel
(
Ts5D
)
% Loop over 5D arrays
[
shift
,
it2D
]
=
min
(
abs
(
Ts2D
-
Ts5D
(
it
)));
if
shift
>
err
;
err
=
shift
;
end
;
PHI_Ts5D
(:,:,
it
)
=
PHI
(:,:,
it2D
);
end
if
err
>
0
;
disp
(
'WARNING Ts2D and Ts5D are shifted'
);
end
;
for
it
=
1
:
numel
(
Ts5D
)
[
~
,
it2D
]
=
min
(
abs
(
Ts2D
-
Ts5D
(
it
)));
si00
(:,:,
it
)
=
real
(
fftshift
(
ifft2
(
squeeze
(
Si00
(:,:,
it
)),
Nr
,
Nz
)));
...
...
@@ -77,11 +87,16 @@ disp('- post processing')
E_pot
=
zeros
(
1
,
Ns2D
);
% Potential energy n^2
E_kin
=
zeros
(
1
,
Ns2D
);
% Kinetic energy grad(phi)^2
ExB
=
zeros
(
1
,
Ns2D
);
% ExB drift intensity \propto |\grad \phi|
% gyrocenter and particle flux from real space
GFlux_ri
=
zeros
(
1
,
Ns2D
);
% Gyrocenter flux Gamma = <ni drphi>
GFlux_zi
=
zeros
(
1
,
Ns2D
);
% Gyrocenter flux Gamma = <ni dzphi>
GFlux_re
=
zeros
(
1
,
Ns2D
);
% Gyrocenter flux Gamma = <ne drphi>
GFlux_ze
=
zeros
(
1
,
Ns2D
);
% Gyrocenter flux Gamma = <ne dzphi>
PFlux_ri
=
zeros
(
1
,
Ns5D
);
% Particle flux
% gyrocenter and particle flux from fourier coefficients
GFLUX_RI
=
real
(
squeeze
(
sum
(
sum
(
-
1
i
*
KZ
.*
Ni00
.*
conj
(
PHI
),
1
),
2
)))
*
(
2
*
pi
/
Nr
/
Nz
)
^
2
;
PFLUX_RI
=
real
(
squeeze
(
sum
(
sum
(
-
1
i
*
KZ
.*
Np_i
.*
conj
(
PHI_Ts5D
),
1
),
2
)))
*
(
2
*
pi
/
Nr
/
Nz
)
^
2
;
Ne_norm
=
zeros
(
Npe
,
Nje
,
Ns5D
);
% Time evol. of the norm of Napj
Ni_norm
=
zeros
(
Npi
,
Nji
,
Ns5D
);
% .
Se_norm
=
zeros
(
Npe
,
Nje
,
Ns5D
);
% Time evol. of the norm of Sapj
...
...
@@ -182,7 +197,30 @@ set(gcf, 'Position', [100, 100, 900, 800])
end
end
grid
on
;
xlabel
(
'$t c_s/R$'
);
ylabel
(
'$\sum_{k_r,k_z}|S_i^{pj}|$'
);
%legend('show');
suptitle
([
'$\nu_{'
,
CONAME
,
'}=$'
,
num2str
(
NU
),
', $\eta_B=$'
,
num2str
(
ETAB
)]);
% suptitle(['$\nu_{',CONAME,'}=$', num2str(NU), ', $\eta_B=$',num2str(ETAB)]);
save_figure
end
if
1
%% Particle fluxes
fig
=
figure
;
FIGNAME
=
[
'gamma'
,
sprintf
(
'_%.2d'
,
JOBNUM
)];
set
(
gcf
,
'Position'
,
[
100
,
100
,
1200
,
400
])
subplot
(
211
)
plot
(
Ts2D
,
GFlux_ri
);
hold
on
plot
(
Ts5D
,
PFlux_ri
,
'--'
);
hold
on
ylabel
(
'$\Gamma_r$'
);
grid
on
title
([
'$\eta='
,
num2str
(
ETAB
),
'\quad'
,
...
'\nu_{'
,
CONAME
,
'}='
,
num2str
(
NU
),
'$'
])
legend
([
'$P='
,
num2str
(
PMAXI
),
'$, $J='
,
num2str
(
JMAXI
),
'$'
],
'Particle flux'
)
%'$\eta\gamma_{max}/k_{max}^2$')
set
(
gca
,
'xticklabel'
,[])
subplot
(
212
)
plot
(
Ts2D
,
GFLUX_RI
);
hold
on
plot
(
Ts5D
,
PFLUX_RI
,
'--'
);
hold
on
ylabel
(
'$\Gamma_r$'
);
grid
on
title
([
'$\eta='
,
num2str
(
ETAB
),
'\quad'
,
...
'\nu_{'
,
CONAME
,
'}='
,
num2str
(
NU
),
'$'
])
legend
([
'$P='
,
num2str
(
PMAXI
),
'$, $J='
,
num2str
(
JMAXI
),
'$'
],
'Particle flux'
)
%'$\eta\gamma_{max}/k_{max}^2$')
set
(
gca
,
'xticklabel'
,[])
save_figure
end
...
...
@@ -192,6 +230,7 @@ fig = figure; FIGNAME = 'space_time_drphi';set(gcf, 'Position', [100, 100, 1200
subplot
(
311
)
plot
(
Ts2D
,
GFlux_ri
);
hold
on
plot
(
Ts5D
,
PFlux_ri
,
'.'
);
hold
on
plot
(
Ts2D
,
GFLUX_RI
,
'--'
);
hold
on
% plot(Ts2D,Bohm_transport*ones(size(Ts2D)),'--'); hold on
ylabel
(
'$\Gamma_r$'
);
grid
on
title
([
'$\eta='
,
num2str
(
ETAB
),
'\quad'
,
...
...
...
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