gs2crmod 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gs2crmod.gemspec +3 -1
- data/test/agk_slab_itg_low_kperp.in +212 -0
- data/test/agk_slab_itg_low_kperp.tgz +0 -0
- data/test/test_gs2crmod.rb +31 -0
- metadata +3 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/gs2crmod.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gs2crmod"
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Edmund Highcock", "Ferdinand van Wyk"]
|
@@ -62,6 +62,8 @@ Gem::Specification.new do |s|
|
|
62
62
|
"lib/gs2crmod/species_dependent_namelists.rb",
|
63
63
|
"lib/gs2crmod/test_gs2.rb",
|
64
64
|
"lib/gs2crmod_extension.rb",
|
65
|
+
"test/agk_slab_itg_low_kperp.in",
|
66
|
+
"test/agk_slab_itg_low_kperp.tgz",
|
65
67
|
"test/cyclone_low_res.in",
|
66
68
|
"test/cyclone_low_res.tgz",
|
67
69
|
"test/helper.rb",
|
@@ -0,0 +1,212 @@
|
|
1
|
+
!==============================================================================
|
2
|
+
! AstroGK INPUT FILE automatically generated by CodeRunner
|
3
|
+
!==============================================================================
|
4
|
+
!
|
5
|
+
! AstroGK is a gyrokinetic flux tube initial value turbulence code
|
6
|
+
! which can be used for fusion or astrophysical plasmas.
|
7
|
+
!
|
8
|
+
! See http://gyrokinetics.sourceforge.net
|
9
|
+
!
|
10
|
+
! CodeRunner is a framework for the automated running and analysis
|
11
|
+
! of large simulations.
|
12
|
+
!
|
13
|
+
! See http://coderunner.sourceforge.net
|
14
|
+
! by CodeRunner version 0.12.11.0
|
15
|
+
!
|
16
|
+
!==============================================================================
|
17
|
+
|
18
|
+
!==============================
|
19
|
+
!
|
20
|
+
!==============================
|
21
|
+
&diagnostics
|
22
|
+
print_line = .false.
|
23
|
+
print_flux_line = .f.
|
24
|
+
write_linear = .f.
|
25
|
+
! write_nonlin not specified ---
|
26
|
+
write_omega = .false.
|
27
|
+
write_omavg = .false.
|
28
|
+
! write_ascii not specified ---
|
29
|
+
write_kpar = .true.
|
30
|
+
! write_gs not specified ---
|
31
|
+
write_g = .false.
|
32
|
+
! write_gg not specified ---
|
33
|
+
! write_vspace_slices not specified ---
|
34
|
+
write_hrate = .f.
|
35
|
+
! write_elsasser not specified ---
|
36
|
+
! write_density_velocity not specified ---
|
37
|
+
! write_epartot not specified ---
|
38
|
+
write_final_fields = .false.
|
39
|
+
write_final_epar = .false.
|
40
|
+
! write_final_moments not specified ---
|
41
|
+
! write_avg_moments not specified ---
|
42
|
+
! write_Epolar not specified ---
|
43
|
+
! write_Eshell not specified ---
|
44
|
+
write_nl_flux = .f.
|
45
|
+
! write_full_moments_r not specified ---
|
46
|
+
nwrite = 4
|
47
|
+
! nmovie not specified ---
|
48
|
+
! nwrite2 not specified ---
|
49
|
+
! nsave not specified ---
|
50
|
+
navg = 20
|
51
|
+
omegatol = -0.001
|
52
|
+
omegatinst = 500.0
|
53
|
+
! igomega not specified ---
|
54
|
+
! write_lorentzian not specified ---
|
55
|
+
! exit_when_converged not specified ---
|
56
|
+
! make_movie not specified ---
|
57
|
+
save_for_restart = .false.
|
58
|
+
! write_adapt_hc not specified ---
|
59
|
+
! write_verr not specified ---
|
60
|
+
! write_vspectrum not specified ---
|
61
|
+
! write_kspectrum not specified ---
|
62
|
+
! write_init not specified ---
|
63
|
+
! write_gkp not specified ---
|
64
|
+
! write_hkv not specified ---
|
65
|
+
! write_ktrans not specified ---
|
66
|
+
! use_qshell not specified ---
|
67
|
+
! write_ptrans not specified ---
|
68
|
+
! get_wtrans not specified ---
|
69
|
+
! get_etrans not specified ---
|
70
|
+
write_phi_over_time = .false.
|
71
|
+
! write_apar_over_time not specified ---
|
72
|
+
! write_bpar_over_time not specified ---
|
73
|
+
/
|
74
|
+
|
75
|
+
!==============================
|
76
|
+
!
|
77
|
+
!==============================
|
78
|
+
&layouts_knobs
|
79
|
+
layout = "lexys" ! 'yxles', 'lxyes', 'lyxes', 'lexys' Determines the way the grids are laid out in memory.
|
80
|
+
/
|
81
|
+
|
82
|
+
!==============================
|
83
|
+
!
|
84
|
+
!==============================
|
85
|
+
&reinit_knobs
|
86
|
+
delt_adj = 2.0 ! When the time step needs to be changed, it is adjusted
|
87
|
+
delt_minimum = 5.0e-10 ! The minimum time step is delt_minimum.
|
88
|
+
/
|
89
|
+
|
90
|
+
!==============================
|
91
|
+
!
|
92
|
+
!==============================
|
93
|
+
&collisions_knobs
|
94
|
+
collision_model = "none" ! Collision model used in the simulation. Options: 'default', 'none', 'lorentz', 'ediffuse'
|
95
|
+
conserve_momentum = .false.
|
96
|
+
heating = .false.
|
97
|
+
/
|
98
|
+
|
99
|
+
!==============================
|
100
|
+
!
|
101
|
+
!==============================
|
102
|
+
&dist_fn_knobs
|
103
|
+
test = .false.
|
104
|
+
/
|
105
|
+
|
106
|
+
!==============================
|
107
|
+
! 1
|
108
|
+
!==============================
|
109
|
+
&dist_fn_species_knobs_1
|
110
|
+
fexp = 0.48
|
111
|
+
bakdif = 0.05 ! Spatial implicitness parameter. Recommended value: 0.05
|
112
|
+
/
|
113
|
+
|
114
|
+
!==============================
|
115
|
+
!
|
116
|
+
!==============================
|
117
|
+
&hyper_knobs
|
118
|
+
hyper_option = "visc_only"
|
119
|
+
const_amp = .true.
|
120
|
+
include_kpar = .false.
|
121
|
+
isotropic_shear = .true.
|
122
|
+
D_hypervisc = 0.01
|
123
|
+
/
|
124
|
+
|
125
|
+
!==============================
|
126
|
+
!
|
127
|
+
!==============================
|
128
|
+
&init_g_knobs
|
129
|
+
ginit_option = "noise" ! Sets the way that the distribution function is initialized.
|
130
|
+
phiinit = 0.1 ! Average amplitude of initial perturbation of each Fourier mode.
|
131
|
+
chop_side = .false. ! Rarely needed. Forces asymmetry into initial condition.
|
132
|
+
/
|
133
|
+
|
134
|
+
!==============================
|
135
|
+
!
|
136
|
+
!==============================
|
137
|
+
&kgrids
|
138
|
+
grid_option = "single"
|
139
|
+
akperp = 0.01
|
140
|
+
nkpolar = 0
|
141
|
+
/
|
142
|
+
|
143
|
+
!==============================
|
144
|
+
!
|
145
|
+
!==============================
|
146
|
+
&le_grids_knobs
|
147
|
+
ngauss = 8 ! Number of untrapped pitch-angles moving in one direction along field line.
|
148
|
+
negrid = 8 ! Total number of energy grid points
|
149
|
+
ecut = 16.0
|
150
|
+
/
|
151
|
+
|
152
|
+
!==============================
|
153
|
+
!
|
154
|
+
!==============================
|
155
|
+
&nonlinear_terms_knobs
|
156
|
+
nonlinear_mode = "off" ! Include nonlinear terms? ('on','off')
|
157
|
+
cfl = 0.2 ! The maximum delt < cfl * min(Delta_perp/v_perp)
|
158
|
+
/
|
159
|
+
|
160
|
+
!==============================
|
161
|
+
!
|
162
|
+
!==============================
|
163
|
+
¶meters
|
164
|
+
beta = 0.0 ! Ratio of particle to magnetic pressure (reference Beta, not total beta): beta=n_0 T_0 /( B^2 / (8 pi))
|
165
|
+
zeff = 1.0 ! Effective ionic charge.
|
166
|
+
tite = 1.0 ! Ratio of ion to electron temperatures.
|
167
|
+
/
|
168
|
+
|
169
|
+
!==============================
|
170
|
+
!
|
171
|
+
!==============================
|
172
|
+
&knobs
|
173
|
+
delt = 0.2 ! Time step
|
174
|
+
nstep = 500 ! Maximum number of timesteps
|
175
|
+
avail_cpu_time = 7200 ! Specify the available wall clock time in seconds. GS2 will exit before this time.
|
176
|
+
use_Phi = .true.
|
177
|
+
use_Apar = .false.
|
178
|
+
use_Bpar = .false.
|
179
|
+
/
|
180
|
+
|
181
|
+
!==============================
|
182
|
+
!
|
183
|
+
!==============================
|
184
|
+
&species_knobs
|
185
|
+
nspec = 1 ! Number of kinetic species evolved.
|
186
|
+
/
|
187
|
+
|
188
|
+
!==============================
|
189
|
+
! 1
|
190
|
+
!==============================
|
191
|
+
&species_parameters_1
|
192
|
+
z = 1.0 ! Charge
|
193
|
+
mass = 1.0 ! Mass
|
194
|
+
dens = 1.0 ! Density
|
195
|
+
temp = 1.0 ! Temperature
|
196
|
+
tprim = 100 ! -1/T (dT/drho)
|
197
|
+
fprim = 1.0 ! -1/n (dn/drho)
|
198
|
+
uprim = 0.0 ! ?
|
199
|
+
type = "ion" ! Type of species, e.g. 'ion', 'electron', 'beam'
|
200
|
+
nu = 0
|
201
|
+
nu_h = 100.0
|
202
|
+
nexp_h = 6.0
|
203
|
+
/
|
204
|
+
|
205
|
+
!==============================
|
206
|
+
!
|
207
|
+
!==============================
|
208
|
+
&theta_grid
|
209
|
+
z0 = 10.0
|
210
|
+
ntheta = 20
|
211
|
+
/
|
212
|
+
|
Binary file
|
data/test/test_gs2crmod.rb
CHANGED
@@ -135,4 +135,35 @@ class TestAnalysis < Test::Unit::TestCase
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
+
AGK_SLAB_ITG_LOW_KPERP_FOLDER = 'test/agk_slab_itg_low_kperp'
|
138
139
|
|
140
|
+
if ENV['AGK_EXEC']
|
141
|
+
class TestAstrogkSubmission < Test::Unit::TestCase
|
142
|
+
def setup
|
143
|
+
CodeRunner.setup_run_class('gs2', modlet: 'astrogk')
|
144
|
+
CodeRunner::Gs2::Astrogk.make_new_defaults_file('test_gs2crmod_astrogk', 'test/agk_slab_itg_low_kperp.in')
|
145
|
+
FileUtils.mv('test_gs2crmod_astrogk_defaults.rb', CodeRunner::Gs2::Astrogk.rcp.user_defaults_location + '/.')
|
146
|
+
FileUtils.makedirs(tfolder)
|
147
|
+
end
|
148
|
+
def tfolder
|
149
|
+
AGK_SLAB_ITG_LOW_KPERP_FOLDER
|
150
|
+
end
|
151
|
+
def teardown
|
152
|
+
FileUtils.rm(CodeRunner::Gs2::Astrogk.rcp.user_defaults_location + '/' + 'test_gs2crmod_astrogk_defaults.rb')
|
153
|
+
FileUtils.rm(tfolder + '/.CODE_RUNNER_TEMP_RUN_LIST_CACHE')
|
154
|
+
FileUtils.rm(tfolder + '/v/id_1/.code_runner_run_data')
|
155
|
+
FileUtils.rm(tfolder + '/v/id_1/code_runner_results.rb')
|
156
|
+
#Don't uncomment the line below unless you *really* know what you are doing! Replacing the test archive will break many of the tests
|
157
|
+
Dir.chdir('test'){system "tar -czf agk_slab_itg_low_kperp.tgz agk_slab_itg_low_kperp/" unless FileTest.exist?('agk_slab_itg_low_kperp.tgz')}
|
158
|
+
FileUtils.rm_r(tfolder)
|
159
|
+
end
|
160
|
+
def test_submission
|
161
|
+
CodeRunner.submit(C: 'gs2', X: ENV['AGK_EXEC'], D: 'test_gs2crmod_astrogk', n: '4', Y: tfolder, m: 'astrogk')
|
162
|
+
|
163
|
+
CodeRunner.status(Y: tfolder)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else
|
167
|
+
puts "\n************************************\nWarning: agk submission tests not run. Please specify the evironment variable AGK_EXEC (the path to the agk executable) if you wish to test submission.\n************************************\n"
|
168
|
+
sleep 0.1
|
169
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gs2crmod
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -148,6 +148,8 @@ files:
|
|
148
148
|
- lib/gs2crmod/species_dependent_namelists.rb
|
149
149
|
- lib/gs2crmod/test_gs2.rb
|
150
150
|
- lib/gs2crmod_extension.rb
|
151
|
+
- test/agk_slab_itg_low_kperp.in
|
152
|
+
- test/agk_slab_itg_low_kperp.tgz
|
151
153
|
- test/cyclone_low_res.in
|
152
154
|
- test/cyclone_low_res.tgz
|
153
155
|
- test/helper.rb
|