-
Notifications
You must be signed in to change notification settings - Fork 79
/
circularPolarized_64x32_PARALUTION.CFcase
301 lines (264 loc) · 16.9 KB
/
circularPolarized_64x32_PARALUTION.CFcase
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# COOLFluiD Startfile
# Comments begin with '#'
# Test file created by: N. Ozak, on: 2018-08-01
################################################################################
#
# This COOLFluiD CFcase file tests:
#
# Finite Volume,MultiFluidMHD2D (ion-electron), BDF2, mesh with quads,
# converter from Gambit to CFmesh, second-order reconstruction with Venktn
# limiter, periodic BCs upersonic, CUDA implementation for GPUs, PARALUTION with
# CUDA bindings
#
################################################################################
# Assertion For Debugging
#
#CFEnv.ExceptionLogLevel = 1000
#CFEnv.DoAssertions = true
#CFEnv.AssertionDumps = true
#CFEnv.AssertionThrows = true
#CFEnv.AssertThrows = true
#CFEnv.AssertDumps = true
#CFEnv.ExceptionAborts = true
#CFEnv.ExceptionDumps = true
#CFEnv.ExceptionOutputs = true
#CFEnv.RegistSignalHandlers = false
#CFEnv.TraceToStdOut = true
#CFEnv.TraceActive = true
#
# this will always fail with GAMBIT
#CFEnv.ErrorOnUnusedConfig = true
#
### Residual = -6.06514
################################################################################
#
# SubSystem Modules
Simulator.Modules.Libs = libCFmeshFileReader libCFmeshFileWriter libTecplotWriter libMaxwell libMultiFluidMHD libFiniteVolume libNewtonMethod libFiniteVolumeMaxwell libFiniteVolumeMultiFluidMHD libGambit2CFmesh libForwardEuler libParalutionI libFiniteVolumeCUDAParalution
CudaDeviceManager.NbThreadsPerBlock = 256
#SubSystem Parameters
Simulator.Paths.WorkingDir = plugins/MultiFluidMHD/testcases/15_PolarizedWaves
Simulator.Paths.ResultsDir = plugins/MultiFluidMHD/testcases/15_PolarizedWaves
#SubSystem Parameters
Simulator.SubSystem.InteractiveParamReader.FileName = plugins/MultiFluidMHD/testcases/15_PolarizedWaves/TwoFluid_wave_64x32.inter
Simulator.SubSystem.InteractiveParamReader.readRate = 10
#
################################################################################
#
# Physical Model
# order of the reference values is Bx, By, Bz, Ex, Ey, Ez, Psi, Phi, rhoe, rhoi, ue, ve, we, ui, vi, wi, Te, Ti
Simulator.SubSystem.Default.PhysicalModelType = MultiFluidMHD2D #You choose between 2D and 3D
Simulator.SubSystem.MultiFluidMHD2D.refValues = 6e-09 6e-10 6e-10 6.03187489185e-05 6.03187489185e-05 6.03187489185e-05 0.000248312564516 6e-09 6.5336788193e-23 1.67262177774e-20 10271.0531054 10271.0531054 10271.0531054 1563.05016333 1563.05016333 1563.05016333 5187.39732495 5187.39732495 # Characteristic value of the solution for the computation of the numerical Jacobian of the convective Flux
Simulator.SubSystem.MultiFluidMHD2D.refLength = 1.0 # Not changed
Simulator.SubSystem.MultiFluidMHD2D.Is2DHalf = true # true for 2.5D
# Fluids Properties
Simulator.SubSystem.MultiFluidMHD2D.nbSpecies = 2
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.molecularMass1 = 6.5336788193e-30 # Electron mass
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.molecularMass2 = 1.67262177774e-27 # Ion Mass
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.gamma = 1.66666666667
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.nonInducedElectromagnetic = 0.0 0.0 0.0 0.0 0.0 0.0 # Bx By Bz Ex Ey Ez
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.divBCleaningConst = 1.0
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.divECleaningConst = 1.0
#Simulator.SubSystem.MultiFluidMHD2D.DiffTerm.nbSpecies = 2
#Simulator.SubSystem.MultiFluidMHD2D.DiffTerm.dynViscosity = 0. 0.
#Simulator.SubSystem.MultiFluidMHD2D.DiffTerm.thermConductivity = 0. 0.
#Simulator.SubSystem.MultiFluidMHD2D.DiffTerm.BraginskiiTransport = false
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.lightSpeedMax = 413854.274193 # Tunning of the speed of light to speed up the numerical simulation
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.lightSpeedMF = 413854.274193
Simulator.SubSystem.MultiFluidMHD2D.ConvTerm.IsLeake = false # Just when the first fluid is ions and the second is neutrals
################################################################################
# Output
Simulator.SubSystem.OutputFormat = Tecplot CFmesh
Simulator.SubSystem.CFmesh.FileName = Test-sol.CFmesh
Simulator.SubSystem.CFmesh.SaveRate = 500
Simulator.SubSystem.CFmesh.AppendTime = true
Simulator.SubSystem.CFmesh.AppendIter = false
Simulator.SubSystem.Tecplot.FileName = multiFluid.plt
Simulator.SubSystem.Tecplot.Data.outputVar = RhoiViTi
Simulator.SubSystem.Tecplot.SaveRate = 500
#Simulator.SubSystem.Tecplot.Data.printExtraValues = true
#Simulator.SubSystem.Tecplot.Data.SurfaceTRS = x0 y0
Simulator.SubSystem.Tecplot.AppendTime = true #false
Simulator.SubSystem.Tecplot.AppendIter = true
#Simulator.SubSystem.Tecplot.WriteSol = ParWriteSolutionBlock
#Simulator.SubSystem.Tecplot.Data.DataHandleOutput.CCSocketNames = Qtot GradPyi GradPye
#Simulator.SubSystem.Tecplot.Data.DataHandleOutput.CCVariableNames = Charge GradPyi GradPye
#Simulator.SubSystem.Tecplot.Data.DataHandleOutput.CCBlockSize = 1 1 1
################################################################################
# Time Marching
#Simulator.SubSystem.SubSystemStatus.TimeStep = 1.0e-3
#Simulator.SubSystem.SubSystemStatus.ComputeDT = FunctionDT
#Simulator.SubSystem.SubSystemStatus.FunctionDT.Vars = i
#Simulator.SubSystem.SubSystemStatus.FunctionDT.Def = if(i<101,5.0e-3,if(i<111,1e-2,2e-2))
# Stop Condition
Simulator.SubSystem.StopCondition = MaxNumberSteps
Simulator.SubSystem.MaxNumberSteps.nbSteps = 100 #2500
#Simulator.SubSystem.StopCondition = MaxTime
#Simulator.SubSystem.MaxTime.maxTime = 16
#Simulator.SubSystem.StopCondition = Norm
#Simulator.SubSystem.Norm.valueNorm = -20.0
# Linear System
Simulator.SubSystem.LinearSystemSolver = PARALUTION
Simulator.SubSystem.LSSNames = PARALUTION
Simulator.SubSystem.PARALUTION.Data.useGPU = 1
Simulator.SubSystem.PARALUTION.Data.buildOnGPU = true
Simulator.SubSystem.PARALUTION.Data.reBuildRatio = 1
Simulator.SubSystem.PARALUTION.Data.RelativeTolerance = 1e-4
Simulator.SubSystem.PARALUTION.Data.NbKrylovSpaces = 150
Simulator.SubSystem.CellCenterFVM.JacobianSparsity = FVMCellCenteredNoBlock
# Explicit Solver
#Simulator.SubSystem.ConvergenceMethod = FwdEuler
#Simulator.SubSystem.FwdEuler.Data.CFL.Value = 0.1
#Simulator.SubSystem.FwddEuler.Data.CFL.ComputeCFL = Interactive
# Implicit first Order
#Simulator.SubSystem.ConvergenceMethod = NewtonIterator
#Simulator.SubSystem.NewtonIterator.UpdateSol = StdUpdateSol
#Simulator.SubSystem.NewtonIterator.StdUpdateSol.Relaxation= 1.
# CFL definition
#Simulator.SubSystem.NewtonIterator.Data.CFL.ComputeCFL = Interactive
#Simulator.SubSystem.NewtonIterator.Data.CFL.ComputeCFL = Function
#Simulator.SubSystem.NewtonIterator.Data.CFL.Function.Def =\
#if(i<160,1e4,if(i<250,1e5,if(i<670,1e6,if(i<2690,1e7,1e8))))
#Simulator.SubSystem.NewtonIterator.Data.CFL.Value = 1e4
#Simulator.SubSystem.NewtonIterator.Data.CFL.Interactive.CFL = 1.0
#First order in time
#Simulator.SubSystem.NewtonIterator.Data.MaxSteps = 30
#Simulator.SubSystem.NewtonIterator.Data.L2.MonitoredVarID = 15
#Simulator.SubSystem.NewtonIterator.Data.FilterState = Max
#Simulator.SubSystem.NewtonIterator.Data.Max.maskIDs = 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1
#Simulator.SubSystem.NewtonIterator.Data.Max.minValues = 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 10. 10.
#Simulator.SubSystem.NewtonIterator.Data.Norm = -15
# Implicit Second Order
Simulator.SubSystem.ConvergenceMethod = BDF2
Simulator.SubSystem.BDF2.ShowRate = 1
# CFL definition
#Simulator.SubSystem.BDF2.Data.CFL.Value = 1.0
#Simulator.SubSystem.BDF2.Data.CFL.ComputeCFL = Interactive
#Simulator.SubSystem.BDF2.ConvergenceFile = convergence.plt
Simulator.SubSystem.BDF2.Data.MaxSteps = 1000
Simulator.SubSystem.BDF2.Data.L2.GlobalRes = true
Simulator.SubSystem.BDF2.Data.L2.NormalizedRes = true
Simulator.SubSystem.BDF2.Data.L2.RefVals = 6e-09 6e-10 6e-10 6.03187489185e-05 6.03187489185e-05 6.03187489185e-05 0.000248312564516 6e-09 6.5336788193e-23 1.67262177774e-20 10271.0531054 10271.0531054 10271.0531054 1563.05016333 1563.05016333 1563.05016333 5187.39732495 5187.39732495 # Characteristic value of the solution for the computation of the numerical Jacobian of the convective Flux
Simulator.SubSystem.BDF2.Data.Norm = -6.
################################################################################
# Mesh Reader
Simulator.SubSystem.Default.listTRS = PeriodicX PeriodicY # x0 x1
Simulator.SubSystem.MeshCreator = CFmeshFileReader
Simulator.SubSystem.CFmeshFileReader.Data.FileName = Mesh_2x1_64x32_centered_periodic.CFmesh
Simulator.SubSystem.CFmeshFileReader.Data.ScalingFactor = 4.42045054996e-06
# comment this out to Restart
Simulator.SubSystem.CFmeshFileReader.Gambit2CFmesh.Discontinuous = true
Simulator.SubSystem.CFmeshFileReader.Gambit2CFmesh.SolutionOrder = P0
Simulator.SubSystem.CFmeshFileReader.convertFrom = Gambit2CFmesh
Simulator.SubSystem.CFmeshFileReader.ParReadCFmesh.ParCFmeshFileReader.ParMetis.NCommonNodes = 2
################################################################################
# Space Method
Simulator.SubSystem.SpaceMethod = CellCenterFVM
Simulator.SubSystem.CellCenterFVM.ComputeRHS = CellNumJacobVenktnAUSMPlusUpEulerMFMHD2DHalfRhoiViTiDriftWavesTwoFluidP
Simulator.SubSystem.CellCenterFVM.CellNumJacobVenktnAUSMPlusUpEulerMFMHD2DHalfRhoiViTiDriftWavesTwoFluidP.OnGPU = true
Simulator.SubSystem.CellCenterFVM.CellNumJacobVenktnAUSMPlusUpEulerMFMHD2DHalfRhoiViTiDriftWavesTwoFluidP.NbCellsPerBlock = 16
Simulator.SubSystem.CellCenterFVM.CellNumJacobVenktnAUSMPlusUpEulerMFMHD2DHalfRhoiViTiDriftWavesTwoFluidP.UseParalutionPtr = true
#Simulator.SubSystem.CellCenterFVM.PseudoSteadyTimeRhs.zeroDiagValue = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#Simulator.SubSystem.CellCenterFVM.PseudoSteadyTimeRhs.useGlobalDT = false
# second order Time stepping
Simulator.SubSystem.CellCenterFVM.ComputeTimeRHS = BDF2TimeRhsLimited
Simulator.SubSystem.CellCenterFVM.BDF2TimeRhsLimited.TimeLimiter = MinMod
Simulator.SubSystem.CellCenterFVM.BDF2TimeRhsLimited.MinMod.SlopeRatio = 3.
Simulator.SubSystem.CellCenterFVM.BDF2TimeRhsLimited.zeroDiagValue = 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0
### second order: uncomment this
Simulator.SubSystem.CellCenterFVM.SetupCom = LeastSquareP1Setup
Simulator.SubSystem.CellCenterFVM.SetupNames = Setup1
Simulator.SubSystem.CellCenterFVM.Setup1.stencil = FaceVertexPlusGhost
Simulator.SubSystem.CellCenterFVM.UnSetupCom = LeastSquareP1UnSetup
Simulator.SubSystem.CellCenterFVM.UnSetupNames = UnSetup1
#Simulator.SubSystem.CellCenterFVM.Data.PolyRec = Constant
## second order: uncomment this
Simulator.SubSystem.CellCenterFVM.Data.PolyRec = LinearLS2DPeriodic
Simulator.SubSystem.CellCenterFVM.Data.LinearLS2DPeriodic.limitRes = -4.0
Simulator.SubSystem.CellCenterFVM.Data.LinearLS2DPeriodic.gradientFactor = 1.
Simulator.SubSystem.CellCenterFVM.Data.LinearLS2DPeriodic.PeriodicBCNames = Jet1 Jet2
Simulator.SubSystem.CellCenterFVM.Data.Limiter = Venktn2D
Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.isMFMHD = true
Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.coeffEps = 1.
Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.length =72008.4712148
Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.magnitudeValues = 6e-09 6e-10 6e-10 6.03187489185e-05 6.03187489185e-05 6.03187489185e-05 0.000248312564516 6e-09 6.5336788193e-23 1.67262177774e-20 104697.770068 104697.770068 104697.770068 1563.05016333 1563.05016333 1563.05016333 5187.39732495 5187.39732495 #
# Simulator.SubSystem.CellCenterFVM.Data.NodalExtrapolation = DistanceBased
# Simulator.SubSystem.CellCenterFVM.Data.DistanceBased.TrsPriorityList = \
#y0 PeriodicX y1
Simulator.SubSystem.CellCenterFVM.Data.FluxSplitter = AUSMPlusUpMultiFluid2D
Simulator.SubSystem.CellCenterFVM.Data.AUSMPlusUpMultiFluid2D.useMacCormackScaling = false
Simulator.SubSystem.CellCenterFVM.Data.AUSMPlusUpMultiFluid2D.choiceA12 = 1
Simulator.SubSystem.CellCenterFVM.Data.AUSMPlusUpMultiFluid2D.machInf = 1. 1.
Simulator.SubSystem.CellCenterFVM.Data.AUSMPlusUpMultiFluid2D.Coeff = 1. #1.e4
Simulator.SubSystem.CellCenterFVM.Data.AUSMPlusUpMultiFluid2D.Bdiss = 0.098174770424681035
Simulator.SubSystem.CellCenterFVM.Data.AUSMPlusUpMultiFluid2D.Ediss = 1.
Simulator.SubSystem.CellCenterFVM.Data.UpdateVar = RhoiViTi
Simulator.SubSystem.CellCenterFVM.Data.SolutionVar = Cons
#Simulator.SubSystem.CellCenterFVM.Data.DiffusiveVar = RhoiViTi
#Simulator.SubSystem.CellCenterFVM.Data.DerivativeStrategy = Corrected2D
#Simulator.SubSystem.CellCenterFVM.Data.DiffusiveFlux = NavierStokesMF
#Simulator.SubSystem.CellCenterFVM.Data.isAxisymm = true
Simulator.SubSystem.CellCenterFVM.Data.SourceTerm = DriftWaves2DHalfTwoFluid
Simulator.SubSystem.CellCenterFVM.Data.DriftWaves2DHalfTwoFluid.isCollisional = false
Simulator.SubSystem.CellCenterFVM.Data.DriftWaves2DHalfTwoFluid.ElectricCharge = 1.60217662e-19
################################################################################
# Initial Conditions Bx, By, Bz, Ex, Ey, Ez, Psi, Phi, rhoe, rhoi, ue, ve, we, ui, vi, wi, Te, Ti
#order of species is first electrons then of ions!
Simulator.SubSystem.CellCenterFVM.InitComds = InitStateAddVar
Simulator.SubSystem.CellCenterFVM.InitNames = InField
Simulator.SubSystem.CellCenterFVM.InField.applyTRS = InnerFaces
Simulator.SubSystem.CellCenterFVM.InField.InitVars = x y
Simulator.SubSystem.CellCenterFVM.InField.Vars = x y xStar Bpar Bperp Epar Eperp Uepar Ueperp Uipar Uiperp sinalpha cosalpha
Simulator.SubSystem.CellCenterFVM.InField.InitDef = (x*sqrt(1./5.)+y*sqrt(4./5.))\
6e-09\
6e-10*cos(3.10528461412e-05*(x*sqrt(1./5.)+y*sqrt(4./5.)))\
0.\
-6.03187489185e-05*sin(3.10528461412e-05*(x*sqrt(1./5.)+y*sqrt(4./5.)))\
0.\
10271.0531054*cos(3.10528461412e-05*(x*sqrt(1./5.)+y*sqrt(4./5.)))\
0.\
1563.05016333*cos(3.10528461412e-05*(x*sqrt(1./5.)+y*sqrt(4./5.)))\
sqrt(4./5.)\
sqrt(1./5.)
Simulator.SubSystem.CellCenterFVM.InField.Def =\
Bpar*cosalpha-Bperp*sinalpha\
Bpar*sinalpha+Bperp*cosalpha\
6e-10*sin(3.10528461412e-05*xStar)\
Epar*cosalpha-Eperp*sinalpha\
Epar*sinalpha+Eperp*cosalpha\
6.03187489185e-05*cos(3.10528461412e-05*xStar)\
0.0\
0.0\
6.5336788193e-23\
1.67262177774e-20\
Uepar*cosalpha-Ueperp*sinalpha\
Uepar*sinalpha+Ueperp*cosalpha\
10271.0531054*sin(3.10528461412e-05*xStar)\
Uipar*cosalpha-Uiperp*sinalpha\
Uipar*sinalpha+Uiperp*cosalpha\
1563.05016333*sin(3.10528461412e-05*xStar)\
5187.39732495\
5187.39732495
################################################################################
# Boundary Conditions
Simulator.SubSystem.CellCenterFVM.BcComds = BCPeriodicFVMCC BCPeriodicFVMCC ##periodic boundary conditions
Simulator.SubSystem.CellCenterFVM.BcNames = Jet1 Jet2
# Bottom Condition(periodic)
Simulator.SubSystem.CellCenterFVM.Jet1.applyTRS = PeriodicY
Simulator.SubSystem.CellCenterFVM.Jet1.Threshold = 1
Simulator.SubSystem.CellCenterFVM.Jet1.TranslationVector = 0. 226221.284165
Simulator.SubSystem.CellCenterFVM.Jet1.ZeroGradientFlags = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
# Left Condition (periodic)
Simulator.SubSystem.CellCenterFVM.Jet2.applyTRS = PeriodicX
Simulator.SubSystem.CellCenterFVM.Jet2.Threshold = 1
Simulator.SubSystem.CellCenterFVM.Jet2.TranslationVector = 452442.56833 0.
Simulator.SubSystem.CellCenterFVM.Jet2.ZeroGradientFlags = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
################################################################################
# DataProcessing
Simulator.SubSystem.DataPostProcessing = DataProcessing
Simulator.SubSystem.DataProcessing.Data.updateVar = RhoiViTi
Simulator.SubSystem.DataProcessing.Comds = GridConvergenceTwoFluid
Simulator.SubSystem.DataProcessing.Names = GridConvergenceTwoFluid
Simulator.SubSystem.DataProcessing.GridConvergenceTwoFluid.IsTransversal = true
Simulator.SubSystem.DataProcessing.GridConvergenceTwoFluid.OutputFileError = ./Error.plt
Simulator.SubSystem.DataProcessing.ProcessRate = 1
#Simulator.SubSystem.DataProcessing.DivMonitoring.options = ./DivMonitoring.plt