Skip to content

Commit

Permalink
Merge branch 'fix.speciesTimestep.BPO' into 'master.dev'
Browse files Browse the repository at this point in the history
[fix.speciesTimestep.BPO] Fix of BoundaryParticleOutput in combination with species-specific time step

Closes #260

See merge request piclas/piclas!931
  • Loading branch information
scopplestone committed Mar 12, 2024
2 parents 8cf7ce8 + 104699d commit 7b8f993
Show file tree
Hide file tree
Showing 14 changed files with 216 additions and 106 deletions.
1 change: 1 addition & 0 deletions REGGIE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Small test cases to check features with DSMC timedisc: [Link to build](regressio
| | BC_PorousBC | | PorousBC as a pump with 2 species, hard compiled N=1 | nProcs=3 | Total # of removed part through BC | |
| | BC_PorousBC_2DAxi | | PorousBC as a pump with 2 species (axisymmetric, with/without radial weighting), hard compiled N=1 | nProcs=1,2 | Total number density | [Link](regressioncheck/CHE_DSMC/BC_PorousBC_2DAxi/readme.md) |
| | BC_RotationalPeriodic | | Rotationally periodic BC with "worst-case" mesh based on tetrahedrons | nProcs=1,5 | Particle number | [Link](regressioncheck/CHE_DSMC/BC_RotationalPeriodic/readme.md) |
| | BPO_SpeciesTimeStep | | Species-specific time step with BoundaryParticleOutput | nProcs=4 | PartAnalyze, SurfaceAnalyze | [Link](regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/readme.md) |
| | cube | | Collismode=2,3, hard compiled N=1 | nProcs=2 | | |
| | Rotational_Reference_Frame_Regions | | Rotational reference frame with several regions, switching between stationary and rotating frame | nProcs=1,2,3,4 | Particle trajectory | [Link](regressioncheck/CHE_DSMC/Rotational_Reference_Frame_Regions/readme.md) |
| | Rotational_Reference_Frame_RotBC | | Rotational reference frame in combination with the rotationally periodic BC | nProcs=1,2,3,4 | Particle trajectory | [Link](regressioncheck/CHE_DSMC/Rotational_Reference_Frame_RotBC/readme.md) |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
001-TIME,002-Current-Spec-001-SF-001
0.0000000000000000E+000,0.0000000000000000E+000
0.1000000000000000E-008,0.2000000166752067E+001
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
001-TIME,002-Flux-Spec-001-BC_Xplus,003-TotalElectricCurrent-BC_Xplus
0.0000000000000000E+000,0.0000000000000000E+000,0.0000000000000000E+000
0.1000000000000000E-008,0.1248281052631579E+020,-.1999966605370011E+001
6 changes: 6 additions & 0 deletions regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/analyze.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
! compare the last line of PartAnalyze.csv with a reference file
compare_data_file_name = PartAnalyze.csv, SurfaceAnalyze.csv
compare_data_file_reference = PartAnalyze_ref.csv, SurfaceAnalyze_ref.csv
compare_data_file_tolerance = 1e-3
compare_data_file_tolerance_type = relative
compare_data_file_one_diff_per_run=F
2 changes: 2 additions & 0 deletions regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/command_line.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MPI=4
database = ../../../SpeciesDatabase.h5
6 changes: 6 additions & 0 deletions regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/externals.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
! --- Externals Tool Reggie
MPI = 1
externalbinary = ./hopr/build/bin/hopr
externaldirectory = hopr.ini
externalruntime = pre
cmd_suffix =
39 changes: 39 additions & 0 deletions regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/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 =(/2,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
109 changes: 109 additions & 0 deletions regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/parameter.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
IniExactFunc = 0
N = 1 ! Polynomial degree
NAnalyze = 1 ! Number of analyze points
! =============================================================================== !
! PICLAS2VTK
! =============================================================================== !
NVisu = 1
VisuParticles = T
TimeStampLength = 14
! =============================================================================== !
! 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 = 20
Part-AnalyzeStep = 20
Surface-AnalyzeStep = 20
CalcSurfFluxInfo = T
! =============================================================================== !
! CALCULATION
! =============================================================================== !
tend = 1.0E-9
Analyze_dt = 1.0E-9
! =============================================================================== !
! Load Balance
! =============================================================================== !
DoLoadBalance = T
DoInitialAutoRestart = T
Load-DeviationThreshold = 1e-9
! =============================================================================== !
! PARTICLE BOUNDARY
! =============================================================================== !
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/)

CalcBoundaryParticleOutput = T
BPO-NPartBoundaries = 1
BPO-PartBoundaries = (/1/)
BPO-NSpecies = 1
BPO-Species = (/1/)
! =============================================================================== !
! DISCRETIZATION
! =============================================================================== !
Part-maxParticleNumber=500000
Part-Species$-MacroParticleFactor = 5E3,1E4

ManualTimeStep = 5.0000E-11
Part-Species1-TimeStepFactor = 0.2,0.5
! =============================================================================== !
! SPECIES
! =============================================================================== !
Part-nSpecies = 2
Particles-Species-Database = SpeciesDatabase.h5
! =============================================================================== !
! Species1 - electron
! =============================================================================== !
Part-Species1-SpeciesName = electron
Part-Species1-UseCollXSec = T

Part-Species1-nSurfaceFluxBCs=1
Part-Species1-Surfaceflux1-BC=2
Part-Species1-Surfaceflux1-VeloIC = 1E7
Part-Species1-Surfaceflux1-VeloVecIC = (/1,0,0/)
Part-Species1-Surfaceflux1-velocityDistribution = maxwell_lpn
Part-Species1-Surfaceflux1-MWTemperatureIC = 5.
Part-Species1-Surfaceflux1-EmissionCurrent = 2.
! =============================================================================== !
! Species2 - Argon
! =============================================================================== !
Part-Species2-SpeciesName = Ar

Part-Species2-nInits = 1
Part-Species2-Init1-SpaceIC = background
Part-Species2-Init1-velocityDistribution = maxwell_lpn
Part-Species2-Init1-MWTemperatureIC = 300
Part-Species2-Init1-PartDensity = 1E10
Part-Species2-Init1-VeloIC = 0
Part-Species2-Init1-VeloVecIC = (/0.,0.,1./)
! =============================================================================== !
! DSMC
! =============================================================================== !
Particles-HaloEpsVelo=5.0E+07
Particles-DSMC-CalcSurfaceVal=F
UseDSMC=true
Particles-DSMC-CollisMode = 2
Part-NumberOfRandomSeeds=2
Particles-RandomSeed1=1
Particles-RandomSeed2=2
Particles-DSMC-UseOctree=F
Particles-DSMC-UseNearestNeighbour = F
Particles-DSMC-CalcQualityFactors = F
4 changes: 4 additions & 0 deletions regressioncheck/CHE_DSMC/BPO_SpeciesTimeStep/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Boundary Particle Output with Species Time Step
* Particle emission using surface flux by defining an emission current of 2A
* Species specific time step for the electrons (factor 0.2)
* Check whether the resulting current at the oppsite boundary is determined correctly
Loading

0 comments on commit 7b8f993

Please sign in to comment.