Skip to content

Commit

Permalink
Merge branch 'improvement.2Daxi.circularinflow' into 'master.dev'
Browse files Browse the repository at this point in the history
2D axisymmetric and circular inflow

See merge request piclas/piclas!626
  • Loading branch information
pnizenkov committed Apr 11, 2022
2 parents 167d1e9 + 9ae516d commit 05ff81f
Show file tree
Hide file tree
Showing 16 changed files with 310 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ The absolute coordinates are defined as follows for the respective normal direct
| y (=2) | (z,x) |
| z (=3) | (x,y) |

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.
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

Expand Down
4 changes: 2 additions & 2 deletions regressioncheck/CHE_DSMC/2D_VTS_SurfFlux_Tria/analyze.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
compare_data_file_name = PartAnalyze.csv, PartAnalyze.csv, PartAnalyze.csv, PartAnalyze.csv, PartAnalyze.csv, PartAnalyze.csv
compare_data_file_reference = PartAnalyze_ref.csv, PartAnalyze_ref.csv, PartAnalyze_ref.csv, PartAnalyze_ref.csv, PartAnalyze_ref.csv, PartAnalyze_ref.csv
compare_data_file_name = PartAnalyze.csv
compare_data_file_reference = PartAnalyze_ref.csv
compare_data_file_tolerance = 0.05
compare_data_file_tolerance_type = relative
7 changes: 3 additions & 4 deletions regressioncheck/CHE_DSMC/2D_VTS_SurfFlux_Tria/parameter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ Part-FIBGMdeltas=(/2e-6,2e-6,1e-6/)
! =============================================================================== !
Part-Species1-MassIC=5.31352E-26
Part-Species1-MacroParticleFactor=2E2,5E2,2E7
Part-Species1-TempVib=5000
Part-Species1-TempRot=5000

Part-Species1-nSurfaceFluxBCs=1
Part-Species1-Surfaceflux1-BC=2
Expand Down Expand Up @@ -84,7 +82,7 @@ Particles-OctreePartNumNode=80
Particles-OctreePartNumNodeMin=50
Particles-DSMC-CalcQualityFactors=F
! Symmetry
Particles-Symmetry2D=T,T,T
Particles-Symmetry-Order=2
Particles-Symmetry2DAxisymmetric=T,T,F
! Radial Weighting
Particles-RadialWeighting=T,F,F
Expand All @@ -99,4 +97,5 @@ Part-VariableTimeStep-Use2DFunction = T
Part-VariableTimeStep-StagnationPoint = 0.0
Part-VariableTimeStep-ScaleFactor2DFront = 2.0
Part-VariableTimeStep-ScaleFactor2DBack = 2.0
nocrosscombination:Particles-Symmetry2D,Particles-Symmetry2DAxisymmetric,Particles-RadialWeighting,Part-Species1-MacroParticleFactor

nocrosscombination:Particles-Symmetry2DAxisymmetric,Particles-RadialWeighting,Part-Species1-MacroParticleFactor
10 changes: 10 additions & 0 deletions regressioncheck/CHE_DSMC/2D_VTS_SurfFlux_Tria_CircInflow/DSMC.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
! =============================================================================== !
! Species1, O2
! =============================================================================== !
Part-Species1-InteractionID = 2
Part-Species1-Tref = 273
Part-Species1-dref = 4.07E-10
Part-Species1-omega=0.27
Part-Species1-CharaTempRot=2.1
Part-Species1-CharaTempVib=2272.18
Part-Species1-Ediss_eV=5.17
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
001-TIME,002-NumDens-Spe001,003-TempTra-001,004-TempVib001,005-XiVibMean001,006-TempRot001,007-TempTotal001
0.00000000000000E+000,0.00000000000000E+000,0.00000000000000E+000,0.00000000000000E+000,0.00000000000000E+000,0.00000000000000E+000,0.00000000000000E+000
1.00000000000000E-008,1.00201430297027E+021,4.92760615350234E+003,4.98353136944886E+003,1.57858935500910E+000,5.05199540754531E+003,4.97884228338770E+003
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
compare_data_file_name = PartAnalyze.csv
compare_data_file_reference = PartAnalyze_ref.csv
compare_data_file_tolerance = 0.05
compare_data_file_tolerance_type = relative
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MPI=1
cmd_suffix=DSMC.ini
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
! Skip N=1 hard coded
PICLAS_POLYNOMIAL_DEGREE=1
38 changes: 38 additions & 0 deletions regressioncheck/CHE_DSMC/2D_VTS_SurfFlux_Tria_CircInflow/hopr.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ProjectName = cube
Debugvisu = T
DebugVisuLevel=2
NVisu =1
Mode =1

DEFVAR = (REAL): minus_x = -0.5
DEFVAR = (REAL): plus_x = 0.5

DEFVAR = (REAL): plus_y = 2.0

DEFVAR = (REAL): minus_z = -0.1
DEFVAR = (REAL): plus_z = 0.1

Corner =(/minus_x,0.0,minus_z ,, plus_x,0.0,minus_z ,, plus_x,plus_y,minus_z ,, minus_x,plus_y,minus_z ,, minus_x,0.0,plus_z ,, plus_x,0.0,plus_z ,, plus_x,plus_y,plus_z ,, minus_x,plus_y,plus_z /)
nElems =(/5,10,1/)
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
119 changes: 119 additions & 0 deletions regressioncheck/CHE_DSMC/2D_VTS_SurfFlux_Tria_CircInflow/parameter.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
! =============================================================================== !
! EQUATION (linearscalaradvection)
! =============================================================================== !
IniExactFunc = 0

! =============================================================================== !
! DISCRETIZATION
! =============================================================================== !
N = 1 ! Polynomial degree
NAnalyze = 1 ! Number of analyze points
! =============================================================================== !
! MESH
! =============================================================================== !
MeshFile = cube_mesh.h5
useCurveds = F
! if boundaries have to be changed (else they are used from Mesh directly):
TrackingMethod = triatracking
! =============================================================================== !
! OUTPUT / VISUALIZATION
! =============================================================================== !
ProjectName = 2D_SurfFlux_Tria
IterDisplayStep = 100
Part-AnalyzeStep = 100
CalcNumDens = T
CalcTemp = T
! =============================================================================== !
! CALCULATION
! =============================================================================== !
tend = 1.0E-8
Analyze_dt = 1.0E-8
CFLscale = 0.2 ! Scaling of theoretical CFL number
! =============================================================================== !
! 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=open
Part-Boundary3-SourceName=BC_Yplus
Part-Boundary3-Condition=reflective
Part-Boundary4-SourceName=BC_Yminus
Part-Boundary4-Condition=symmetric_axis
Part-Boundary5-SourceName=BC_Zplus
Part-Boundary5-Condition=symmetric
Part-Boundary6-SourceName=BC_Zminus
Part-Boundary6-Condition=symmetric
Part-FIBGMdeltas=(/2e-6,2e-6,1e-6/)
! =============================================================================== !
! Species1 - O2
! =============================================================================== !
Part-Species1-MassIC=5.31352E-26
Part-Species1-MacroParticleFactor=2E2,5E2,2E7

Part-Species1-nSurfaceFluxBCs=2
Part-Species1-Surfaceflux1-BC=2
Part-Species1-Surfaceflux1-velocityDistribution=maxwell_lpn
Part-Species1-Surfaceflux1-VeloIC=5000
Part-Species1-Surfaceflux1-VeloVecIC=(/1.,0.,0./)
Part-Species1-Surfaceflux1-MWTemperatureIC=5000
Part-Species1-Surfaceflux1-TempVib=5000
Part-Species1-Surfaceflux1-TempRot=5000
Part-Species1-Surfaceflux1-PartDensity=1.0E+21
Part-Species1-Surfaceflux1-CircularInflow = T
Part-Species1-Surfaceflux1-axialDir = 1
Part-Species1-Surfaceflux1-origin = (/0,0/)
Part-Species1-Surfaceflux1-rmax = 1E-5

Part-Species1-Surfaceflux2-BC=2
Part-Species1-Surfaceflux2-velocityDistribution=maxwell_lpn
Part-Species1-Surfaceflux2-VeloIC=5000
Part-Species1-Surfaceflux2-VeloVecIC=(/1.,0.,0./)
Part-Species1-Surfaceflux2-MWTemperatureIC=5000
Part-Species1-Surfaceflux2-TempVib=5000
Part-Species1-Surfaceflux2-TempRot=5000
Part-Species1-Surfaceflux2-PartDensity=1.0E+21
Part-Species1-Surfaceflux2-CircularInflow = T
Part-Species1-Surfaceflux2-axialDir = 1
Part-Species1-Surfaceflux2-origin = (/0,0/)
Part-Species1-Surfaceflux2-rmin = 1E-5
Part-Species1-Surfaceflux2-rmax = 2E-5
! =============================================================================== !
! DSMC
! =============================================================================== !
ManualTimeStep=1.0000E-10
Particles-HaloEpsVelo=2.0E+03
Particles-NumberForDSMCOutputs=1
Part-TimeFracForSampling=0.2
Particles-DSMC-CalcSurfaceVal=F
UseDSMC=true
Particles-DSMC-CollisMode=2 !(1:elast coll, 2: elast + rela, 3:chem)
Part-NumberOfRandomSeeds=2
Particles-RandomSeed1=1
Particles-RandomSeed2=2
Particles-DSMC-UseOctree=true
Particles-DSMC-UseNearestNeighbour = T
Particles-OctreePartNumNode=80
Particles-OctreePartNumNodeMin=50
Particles-DSMC-CalcQualityFactors=F
! Symmetry
Particles-Symmetry-Order=2
Particles-Symmetry2DAxisymmetric=T,T,F
! Radial Weighting
Particles-RadialWeighting=T,F,F
Particles-RadialWeighting-PartScaleFactor=5
Particles-RadialWeighting-CloneMode=2
Particles-RadialWeighting-CloneDelay=10
! Variable Time Step
Part-VariableTimeStep-LinearScaling = F,T
Part-VariableTimeStep-ScaleFactor = 2.0
! VTS-2D/Axi only
Part-VariableTimeStep-Use2DFunction = T
Part-VariableTimeStep-StagnationPoint = 0.0
Part-VariableTimeStep-ScaleFactor2DFront = 2.0
Part-VariableTimeStep-ScaleFactor2DBack = 2.0

nocrosscombination:Particles-Symmetry2DAxisymmetric,Particles-RadialWeighting,Part-Species1-MacroParticleFactor
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 2D: Particle Emission through Surface Flux & Circular Inflow(Channel/Cylinder)
* Testing the surface flux emission routine for 2D, axisymmetric (radial weighting=T/F) and variable time step (linear scaling) with the circular inflow feature
* Comparison of PartAnalyze: number density and temperature
* Desired result of DSMC output: constant number density of n=1E21 and all temperatures at T=5000K
* Comparison of DSMCState not possible due to strong fluctuations
17 changes: 10 additions & 7 deletions regressioncheck/WEK_BGKFlow/Flow_N2_70degCone/parameter.ini
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,21 @@ Particles-OctreePartNumNode = 40
Particles-OctreePartNumNodeMin = 28
Particles-MPIWeight = 1000
! Symmetry
Particles-Symmetry2D = T
Particles-Symmetry-Order = 2
Particles-Symmetry2DAxisymmetric = T
! Radial Weighting
Particles-RadialWeighting = T
Particles-RadialWeighting-PartScaleFactor = 60
Particles-RadialWeighting-CloneMode = 2
Particles-RadialWeighting-CloneDelay = 5
! BGK-Flow
Particles-BGK-CollModel = 1
Particles-BGK-UseQuantVibEn=T
Particles-BGK-DoVibRelaxation=T
Particles-BGK-CollModel = 1
Particles-BGK-DoVibRelaxation = T
Particles-BGK-UseQuantVibEn = T
! BGK Refinement
Particles-BGK-DoCellAdaptation=T
Particles-BGK-MinPartsPerCell=12
Particles-BGK-SplittingDens = 3.8E20
Particles-BGK-DoCellAdaptation = T
Particles-BGK-MinPartsPerCell = 12
Particles-BGK-SplittingDens = 3.8E20
! Couped BGK-DSMC simulation
Particles-CoupledBGKDSMC = F,T
Particles-BGK-DSMC-SwitchDens = 5E20
Loading

0 comments on commit 05ff81f

Please sign in to comment.