Skip to content

Commit

Permalink
Merge branch 'feature.thermionicEmission' into 'master.dev'
Browse files Browse the repository at this point in the history
[feature.thermionicEmission] Thermionic emission modelling

See merge request piclas/piclas!656
  • Loading branch information
pnizenkov committed Jun 22, 2022
2 parents a4e0a7d + 0cf02c2 commit 23c1d78
Show file tree
Hide file tree
Showing 26 changed files with 476 additions and 269 deletions.
65 changes: 33 additions & 32 deletions REGGIE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,21 @@ given below
Part-Species1-Surfaceflux1-TempVib=300.
Part-Species1-Surfaceflux1-TempElec=300.

### Emission Current & Mass Flow

Instead of the particle number density `PartDensity`, an emission current $I$ [A] (e.g. to model a thermionic emission) or a mass
flow $\dot{m}$ [kg/s] (e.g. to model outgassing) can be given:

Part-Species1-Surfaceflux1-EmissionCurrent=2
! or
Part-Species1-Surfaceflux1-Massflow=1e-11

In this case, the number of simulation particles to be inserted each time step $\Delta t$ is determined directly from the rate. The
emission current only allows charged species and determines the number of particles according to the charge.
The velocity magnitude can be zero (per default) or a defined value (through `VeloIC` and `VeloVecIC`). The respective boundary can
be `open` or `reflective`. An example can be found in the regression test `regressioncheck/CHE_DSMC/SurfFlux_Tria_CurrentMassflow`
For subsonic boundary conditions, where the velocity at the boundary is unknown, refer to Section {ref}`sec:particle-emission-adaptive`.

### Circular Inflow

The emission of particles from a surface flux can be limited to the area within a circle or a ring. The respective boundary has to
Expand Down Expand Up @@ -323,7 +338,8 @@ The absolute coordinates are defined as follows for the respective normal direct

Multiple circular inflows can be defined on a single boundary through multiple surface fluxes, e.g. to enable the simulation of multiple inlets on a chamber wall. Circular inflows are also supported with axisymmetric simulations, under the assumptions that the chosen surface is in the yz-plane (and thus has a normal direction in x) and the minimal and maximum radii are in the positive y-direction.

### Adaptive Boundaries
(sec:particle-emission-adaptive)=
### Adaptive/Subsonic Boundaries

Different adaptive boundaries can be defined as a part of a surface flux to model subsonic in- and outflows, where the emission is
adapted based on the prevalent conditions at the boundary. The modelling is based on the publications by {cite}`Farbar2014` and {cite}`Lei2017`.
Expand Down Expand Up @@ -380,15 +396,17 @@ simulation is then determined by
$$\dot{m} = \frac{QM}{1000RT},$$

where $R=8.314$ J mol$^{-1}$K$^{-1}$ is the gas constant, $M$ the molar mass in [g mol$^{-1}$] and $T$ is the gas temperature [K].
It should be noted that while multiple adaptive boundaries are possible, adjacent boundaries that share a mesh element should be avoided or treated carefully.

### Verification

To verify the resulting mass flow rate of an adaptive surface flux, the following option can be enabled
To verify the resulting current [A], mass flow rate [kg s$^{-1}$] or the pressure at an adaptive surface flux [Pa], the following option can be enabled

CalcAdaptiveBCInfo = T
CalcSurfFluxInfo = T

This will output a species-specific mass flow rate [kg s$^{-1}$] and the average pressure in the adjacent cells [Pa] for each
surface flux condition in the `PartAnalyze.csv`, which gives the current values for the time step. For the former, positive values
correspond to a net mass flux into the domain and negative values vice versa. It should be noted that while multiple adaptive
boundaries are possible, adjacent boundaries that share a mesh element should be avoided or treated carefully.
This will output a species-specific rate and/or the average pressure in the adjacent cells (in case of an adaptive/subsonic BC)
for each surface flux condition in the `PartAnalyze.csv`. It gives the current values for the time step. For the former, positive values
correspond to a net flux into the domain and negative values vice versa.

### Missing descriptions

Expand Down
27 changes: 1 addition & 26 deletions regressioncheck/CHE_DSMC/BC_InnerReflective_36elems/DSMC.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,4 @@ Part-Species1-InteractionID=1
Part-Species1-Tref = 273
Part-Species1-dref = 4.17E-10
Part-Species1-omega=0.24
Part-Species1-HeatOfFormation_K=0.0
! =============================================================================== !
! Species2, e
! =============================================================================== !
Part-Species2-SpeciesName=electron
Part-Species2-InteractionID = 4
Part-Species2-Tref = 273
Part-Species2-dref = 2.817920E-15
Part-Species2-omega=0.24
! =============================================================================== !
! Species3, ArIon
! =============================================================================== !
Part-Species3-SpeciesName=ArIon
Part-Species3-InteractionID = 10
Part-Species3-Tref = 273
Part-Species3-dref = 4.17E-10
Part-Species3-omega=0.24
Part-Species3-PreviousState=1
! =============================================================================== !
! Ionization
! =============================================================================== !
DSMC-NumOfReactions=1
! Reaction 1 | Ar + e --> ArIon + e + e
DSMC-Reaction1-ReactionModel=QK
DSMC-Reaction1-Reactants=(/1,2,0/)
DSMC-Reaction1-Products=(/3,2,2,0/)
Part-Species1-HeatOfFormation_K=0.0
27 changes: 1 addition & 26 deletions regressioncheck/CHE_DSMC/BC_InnerReflective_8elems/DSMC.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,4 @@ Part-Species1-InteractionID=1
Part-Species1-Tref = 273
Part-Species1-dref = 4.17E-10
Part-Species1-omega=0.24
Part-Species1-HeatOfFormation_K=0.0
! =============================================================================== !
! Species2, e
! =============================================================================== !
Part-Species2-SpeciesName=electron
Part-Species2-InteractionID = 4
Part-Species2-Tref = 273
Part-Species2-dref = 2.817920E-15
Part-Species2-omega=0.24
! =============================================================================== !
! Species3, ArIon
! =============================================================================== !
Part-Species3-SpeciesName=ArIon
Part-Species3-InteractionID = 10
Part-Species3-Tref = 273
Part-Species3-dref = 4.17E-10
Part-Species3-omega=0.24
Part-Species3-PreviousState=1
! =============================================================================== !
! Ionization
! =============================================================================== !
DSMC-NumOfReactions=1
! Reaction 1 | Ar + e --> ArIon + e + e
DSMC-Reaction1-ReactionModel=QK
DSMC-Reaction1-Reactants=(/1,2,0/)
DSMC-Reaction1-Products=(/3,2,2,0/)
Part-Species1-HeatOfFormation_K=0.0
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
! EQUATION (linearscalaradvection)
! =============================================================================== !
IniExactFunc = 0

CFLscale = 0.2 ! Scaling of theoretical CFL number
! =============================================================================== !
! DISCRETIZATION
! =============================================================================== !
Expand All @@ -21,13 +21,13 @@ TriaSurfaceFlux = T
! =============================================================================== !
ProjectName = ConstMassflow
IterDisplayStep = 100
CalcAdaptiveBCInfo = TRUE
CalcSurfFluxInfo = TRUE
! =============================================================================== !
! CALCULATION
! =============================================================================== !
tend = 1.0E-5
Analyze_dt = 1.0E-5
CFLscale = 0.2 ! Scaling of theoretical CFL number
tend = 1.0E-5
Analyze_dt = 1.0E-5
ManualTimeStep = 1.0000E-7
! =============================================================================== !
! PARTICLES
! =============================================================================== !
Expand Down Expand Up @@ -76,10 +76,10 @@ AdaptiveBC-RelaxationFactor = 0.02
AdaptiveBC-SamplingIteration = 0,10,10
AdaptiveBC-TruncateRunningAverage = F,F,T
AdaptiveBC-AverageValuesOverBC = T,F,T
nocrosscombination:AdaptiveBC-SamplingIteration,AdaptiveBC-TruncateRunningAverage,AdaptiveBC-AverageValuesOverBC
! =============================================================================== !
! DSMC
! =============================================================================== !
ManualTimeStep=1.0000E-7
Particles-HaloEpsVelo=2.0E+03
!Part-WriteMacroValues=T
!Part-IterationForMacroVal=20000
Expand All @@ -94,5 +94,3 @@ Particles-RandomSeed2=2
Particles-DSMC-UseOctree=true
Particles-DSMC-UseNearestNeighbour = T
Particles-DSMC-CalcQualityFactors=F

nocrosscombination:AdaptiveBC-SamplingIteration,AdaptiveBC-TruncateRunningAverage,AdaptiveBC-AverageValuesOverBC
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ProjectName = ConstPressure
IterDisplayStep = 10
CalcNumSpec = TRUE
CalcPartBalance = TRUE
CalcSurfFluxInfo = TRUE
! =============================================================================== !
! CALCULATION
! =============================================================================== !
Expand Down Expand Up @@ -87,6 +88,7 @@ AdaptiveBC-RelaxationFactor = 0.02
AdaptiveBC-SamplingIteration = 0,10,10
AdaptiveBC-TruncateRunningAverage = F,F,T
AdaptiveBC-AverageValuesOverBC = T,F
nocrosscombination:AdaptiveBC-SamplingIteration,AdaptiveBC-TruncateRunningAverage
! =============================================================================== !
! DSMC
! =============================================================================== !
Expand All @@ -103,5 +105,3 @@ Particles-RandomSeed2=2
Particles-DSMC-UseOctree=true
Particles-DSMC-UseNearestNeighbour = T
Particles-DSMC-CalcQualityFactors=true

nocrosscombination:AdaptiveBC-SamplingIteration,AdaptiveBC-TruncateRunningAverage
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DSMC - Surface Flux with Adaptive/Subsonic Pressure BC
* NOTE: Regression test only checks successful run
* A more detailed test is available as part of the WEK_DSMC
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
! =============================================================================== !
! Species1, e
! =============================================================================== !
Part-Species1-SpeciesName = electron
Part-Species1-InteractionID = 4
Part-Species1-Tref = 273
Part-Species1-dref = 1E-15
Part-Species1-omega = 0.24
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
001-TIME,002-Current-Spec-001-SF-001
0.0000000000000000E+000,0.0000000000000000E+000
0.1000000000000000E-009,0.2000157180052000E+001
0.2000000000000000E-009,0.1999836744746000E+001
0.3000000000000000E-009,0.2000157180052000E+001
0.4000000000000000E-009,0.1999836744746000E+001
0.5000000000000000E-009,0.2000157180052000E+001
0.6000000000000000E-009,0.1999836744746000E+001
0.7000000000000000E-009,0.2000157180052000E+001
0.7999999999999999E-009,0.1999836744746000E+001
0.8999999999999999E-009,0.2000157180052000E+001
0.1000000000000000E-008,0.1999836744745997E+001
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
001-TIME,002-Massflow-Spec-001-SF-001
0.0000000000000000E+000,0.0000000000000000E+000
0.1000000000000000E-009,0.1137292400000000E-010
0.2000000000000000E-009,0.1137110200000000E-010
0.3000000000000000E-009,0.1137292400000000E-010
0.4000000000000000E-009,0.1137110200000000E-010
0.5000000000000000E-009,0.1137292400000000E-010
0.6000000000000000E-009,0.1137110200000000E-010
0.7000000000000000E-009,0.1137292400000000E-010
0.7999999999999999E-009,0.1137110200000000E-010
0.8999999999999999E-009,0.1137292400000000E-010
0.1000000000000000E-008,0.1137110199999998E-010
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
! compare the last line of PartAnalyze.csv with a reference file
compare_data_file_name = PartAnalyze.csv,PartAnalyze.csv,PartAnalyze.csv,PartAnalyze.csv,PartAnalyze.csv,PartAnalyze.csv,PartAnalyze.csv,PartAnalyze.csv
compare_data_file_reference = PartAnalyze_ref_Massflow.csv,PartAnalyze_ref_Massflow.csv,PartAnalyze_ref_Massflow.csv,PartAnalyze_ref_Massflow.csv,PartAnalyze_ref_Current.csv,PartAnalyze_ref_Current.csv,PartAnalyze_ref_Current.csv,PartAnalyze_ref_Current.csv
compare_data_file_tolerance = 1e-3
compare_data_file_tolerance_type = relative
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MPI=4
cmd_suffix=DSMC.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
! Skip N=1 hard coded
PICLAS_POLYNOMIAL_DEGREE=1
39 changes: 39 additions & 0 deletions regressioncheck/CHE_DSMC/SurfFlux_Tria_CurrentMassflow/hopr.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ProjectName = channel
Debugvisu = T
DebugVisuLevel=1
NVisu =1
Mode =1

DEFVAR = (REAL): minus_x = 0.0
DEFVAR = (REAL): plus_x = 10.0

DEFVAR = (REAL): minus_y = 0.0
DEFVAR = (REAL): plus_y = 1.0

DEFVAR = (REAL): minus_z = 0.0
DEFVAR = (REAL): plus_z = 1.0

Corner =(/minus_x,minus_y,minus_z ,, plus_x,minus_y,minus_z ,, plus_x,plus_y,minus_z ,, minus_x,plus_y,minus_z ,, minus_x,minus_y,plus_z ,, plus_x,minus_y,plus_z ,, plus_x,plus_y,plus_z ,, minus_x,plus_y,plus_z /)
nElems =(/1,2,2/)
elemtype =108

BCIndex =(/6 ,4 ,1 ,3 ,2 ,5/)
! =(/z-,y-,x+,y+,x-,z+/)
nZones = 1
nUserDefinedBoundaries=6
BoundaryName=BC_Xplus
BoundaryType=(/3,0,0,0/)
BoundaryName=BC_Xminus
BoundaryType=(/3,0,0,0/)
BoundaryName=BC_Yplus
BoundaryType=(/4,0,0,0/)
BoundaryName=BC_Yminus
BoundaryType=(/4,0,0,0/)
BoundaryName=BC_Zplus
BoundaryType=(/4,0,0,0/)
BoundaryName=BC_Zminus
BoundaryType=(/4,0,0,0/)

postscalemesh=true
meshscale=1e-5
jacobiantolerance=1e-20
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
! =============================================================================== !
! EQUATION (linearscalaradvection)
! =============================================================================== !
IniExactFunc = 0
CFLscale = 0.2 ! Scaling of theoretical CFL number
! =============================================================================== !
! DISCRETIZATION
! =============================================================================== !
N = 1 ! Polynomial degree
NAnalyze = 1 ! Number of analyze points
! =============================================================================== !
! MESH
! =============================================================================== !
MeshFile = channel_mesh.h5
useCurveds = F
! if boundaries have to be changed (else they are used from Mesh directly):
TrackingMethod = triatracking
! =============================================================================== !
! OUTPUT / VISUALIZATION
! =============================================================================== !
ProjectName = SurfFlux_Tria_EmissionCurrent
IterDisplayStep = 10
Part-AnalyzeStep = 1
CalcSurfFluxInfo = T
! =============================================================================== !
! CALCULATION
! =============================================================================== !
tend = 1.0E-9
Analyze_dt = 1.0E-9
ManualTimeStep = 1.0000E-10
! =============================================================================== !
! PARTICLES
! =============================================================================== !
Part-maxParticleNumber=500000
Part-nSpecies=1
Part-nBounds=6
Part-Boundary1-SourceName=BC_Xplus
Part-Boundary1-Condition=open
Part-Boundary2-SourceName=BC_Xminus
Part-Boundary2-Condition=reflective
Part-Boundary3-SourceName=BC_Yplus
Part-Boundary3-Condition=reflective
Part-Boundary4-SourceName=BC_Yminus
Part-Boundary4-Condition=reflective
Part-Boundary5-SourceName=BC_Zplus
Part-Boundary5-Condition=symmetric
Part-Boundary6-SourceName=BC_Zminus
Part-Boundary6-Condition=symmetric
Part-FIBGMdeltas=(/1e-5,5e-6,5e-6/)
! =============================================================================== !
! Species1 - electron
! =============================================================================== !
Part-Species1-MassIC = 9.11E-31
Part-Species1-ChargeIC = -1.60217653E-19
Part-Species1-MacroParticleFactor = 2E5

Part-Species1-nSurfaceFluxBCs=1
Part-Species1-Surfaceflux1-BC=2

Part-Species1-Surfaceflux1-VeloIC = 0.,1E6
Part-Species1-Surfaceflux1-VeloVecIC = (/1,0,0/)
Part-Species1-Surfaceflux1-velocityDistribution = maxwell_lpn
Part-Species1-Surfaceflux1-MWTemperatureIC = 5.,500000.
Part-Species1-Surfaceflux1-Massflow = 1.1372E-11,0.
Part-Species1-Surfaceflux1-EmissionCurrent = 0.,2.

nocrosscombination:Part-Species1-Surfaceflux1-EmissionCurrent,Part-Species1-Surfaceflux1-Massflow
! =============================================================================== !
! DSMC
! =============================================================================== !
Particles-HaloEpsVelo=2.0E+06
Particles-DSMC-CalcSurfaceVal=F
UseDSMC=true
Particles-DSMC-CollisMode=1 !(1:elast coll, 2: elast + rela, 3:chem)
Part-NumberOfRandomSeeds=2
Particles-RandomSeed1=5
Particles-RandomSeed2=6
Particles-DSMC-UseOctree=F
Particles-DSMC-UseNearestNeighbour = F
Particles-DSMC-CalcQualityFactors=F
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DSMC - Emission Current/Mass flow through Surface Flux
* Particle emission using surface flux by defining an emission current of 2A or a mass flow of 1.1372E-11 kg/s
* Comparing the current and mass flow output (CalcSurfFluxInfo = T), which is based on the particle balance (in - out)
* Comparing the number of inserted particles per time step, testing with
* Velocity: 0 and 1E6 m/s
* Temperature: 5K and 500 000K
* Expected value is 6241/6242 simulation particles (corresponds to 1.25E+19 real particles per second)
* w = 2e5
* dt = 1e-10
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TrackingMethod = triatracking
ProjectName = ConstMassflow
IterDisplayStep = 10
Part-AnalyzeStep = 2
CalcAdaptiveBCInfo = TRUE
CalcSurfFluxInfo = TRUE
! =============================================================================== !
! PICLAS2VTK
! =============================================================================== !
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TrackingMethod = triatracking
ProjectName = ConstPressure
IterDisplayStep = 10
Part-AnalyzeStep = 2
CalcAdaptiveBCInfo = TRUE
CalcSurfFluxInfo = TRUE
! =============================================================================== !
! CALCULATION
! =============================================================================== !
Expand Down
Loading

0 comments on commit 23c1d78

Please sign in to comment.