Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
radiative
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fabian Wieschollek
radiative
Commits
6ebc5841
Commit
6ebc5841
authored
May 14, 2020
by
Fabian Wieschollek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added heat source
parent
14a8fd8f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
31 deletions
+42
-31
.gitignore
.gitignore
+1
-0
namelists/lithiumtest.nml
namelists/lithiumtest.nml
+6
-6
radiative/mod_non_coronal.f90
radiative/mod_non_coronal.f90
+35
-25
No files found.
.gitignore
View file @
6ebc5841
...
...
@@ -43,6 +43,7 @@ import_eqdsk
jorek2_main
jorek2_target2vtk
jorek2_powers
jorek2_radiative
jorek2_import_perturbation
jorek2_import_perturbation_new_flags
jorek2_import_perturbation_new_flags
...
...
namelists/lithiumtest.nml
View file @
6ebc5841
...
...
@@ -4,18 +4,18 @@
ADASname = '96_li' ! Prefix of ADAS files
tstep = 0.01d0 ! Timestep
ftime =
300.d0
! Final time
ftime =
10000.d0
! Final time
nout = 100 ! Output every
temperature = 0.04d0 ! Initial electron temperature (everything in JOREK-units, central_density=1.d0)
density_plasma = 1.d0 ! Plasma ion density
density_imp = 1.d-1 ! Impurity ion density
t_rad = 0.d0
! Turn on radiative cooling term after
t_rad = 0.d0
0
! Turn on radiative cooling term after
t_equi = 1.d99 ! Assume coronal equilibrium after
C_cooling(1) =
0.d0
! Linear Cooling rate dT/dt
C_cooling(2) = 1.d
99 ! Start cooling after
C_cooling(3) =
2.d-5 ! Stop cooling, if Te < 1 eV
C_cooling(1) =
9.d-6
! Linear Cooling rate dT/dt
C_cooling(2) = 1.d
3 ! Start cooling after ...
C_cooling(3) =
1.d-2 ! Stop cooling, if Te < ...
/
radiative/mod_non_coronal.f90
View file @
6ebc5841
...
...
@@ -23,6 +23,7 @@ type non_coronal
real
*
8
::
density_plasma
!< constant density of ions of the background plasma
real
*
8
::
density_imp
!< constant density of the imuprity ions
real
*
8
,
dimension
(
3
)
::
C_cooling
!< Coefficient for linear aritifical cooling C(1): dT/dt C(2): when starts cooling, C(3): Tmin
real
*
8
::
t_rad
,
t_equi
!< when starts radiative cooling, when go into coronal equilbrium
real
*
8
,
allocatable
::
fractions
(:)
!< Fractional charge states of impurites
! Constants
...
...
@@ -86,7 +87,9 @@ cor%density_plasma = density_plasma
cor
%
density_imp
=
density_imp
cor
%
fractions
=
0.0d0
cor
%
fractions
(
1
)
=
1.0d0
cor
%
C_cooling
=
C_cooling
cor
%
t_rad
=
t_rad
cor
%
t_equi
=
t_equi
call
cor
%
calculate_GCRs
()
...
...
@@ -173,7 +176,8 @@ ddensity_dt = 0.d0
dfractions_dt
=
0.d0
! ---- non coronal
do
iz
=
1
,
cor
%
n_Z0
if
(
cor
%
time
.lt.
cor
%
t_equi
)
then
do
iz
=
1
,
cor
%
n_Z0
if
(
iz
.gt.
1
)
then
dfractions_dt
(
iz
)
=
dfractions_dt
(
iz
)
&
+
cor
%
fractions
(
iz
-1
)
*
cor
%
density
*
cor
%
ion_rate
(
iz
-1
)
&
! Gain by Ionization from (iz-1) to iz
...
...
@@ -184,24 +188,26 @@ do iz=1,cor%n_Z0
+
cor
%
fractions
(
iz
+1
)
*
cor
%
density
*
cor
%
rec_rate
(
iz
)
&
! Gain by Recombination from (iz+1) to iz
-
cor
%
fractions
(
iz
)
*
cor
%
density
*
cor
%
ion_rate
(
iz
)
! Loss by Ionization from iz to (iz+1)
end
if
end
do
end
do
cor
%
fractions
=
fractions0
+
dfractions_dt
*
dtime
ddensity_dt
=
cor
%
density_imp
*
dot_product
(
dfractions_dt
,
cor
%
Z
)
cor
%
fractions
=
fractions0
+
dfractions_dt
*
dtime
ddensity_dt
=
cor
%
density_imp
*
dot_product
(
dfractions_dt
,
cor
%
Z
)
! --- coronal equilibrium
!cor%fractions = cor%equilibrium()
!ddensity_dt = cor%density_imp * ( dot_product(cor%fractions,cor%Z) - dot_product(fractions0,cor%Z) ) / dtime
else
cor
%
fractions
=
cor
%
equilibrium
()
ddensity_dt
=
cor
%
density_imp
*
(
dot_product
(
cor
%
fractions
,
cor
%
Z
)
-
dot_product
(
fractions0
,
cor
%
Z
)
)
/
dtime
end
if
!Diffusion and fueling
!dfractions_dt = cor%fractions/tau
!dfractions_dt(1) = sum(cor%dfractions_dt(2:cor%n_Z0))
dtemperature_dt
=
-
2.d0
/
3.d0
*
dnT_rad_dt
/
density_tot0
&
if
(
cor
%
time
.gt.
cor
%
t_rad
)
then
dtemperature_dt
=
-
2.d0
/
3.d0
*
dnT_rad_dt
/
density_tot0
end
if
dtemperature_dt
=
dtemperature_dt
&
-
dT_cool_dt
&
-
ddensity_dt
*
temperature0
/
density_tot0
...
...
@@ -320,7 +326,11 @@ function calculate_cooling(cor)
class
(
non_coronal
),
intent
(
in
)
::
cor
!< Coronal equilibrium type
real
*
8
::
calculate_cooling
calculate_cooling
=
0.d0
if
(
cor
%
time
.gt.
cor
%
C_cooling
(
2
)
.and.
cor
%
temperature
.gt.
cor
%
C_cooling
(
3
)
)
then
calculate_cooling
=
cor
%
C_cooling
(
1
)
else
calculate_cooling
=
0.d0
end
if
end
function
calculate_cooling
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment