Skip to content

Commit 270572d

Browse files
committed
Merge branch 'master.dev' into 'master'
Release 3.5.0 See merge request piclas/piclas!1008
2 parents 7361ca7 + 8d591ce commit 270572d

File tree

118 files changed

+3008
-983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3008
-983
lines changed

.github/workflows/cmake-ninja.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ jobs:
411411
- name: Upload artifacts
412412
uses: actions/upload-artifact@v4
413413
with:
414-
name: piclas-binaries-v3.4.0
414+
name: piclas-binaries-v3.5.0
415415
path: artifacts
416416

417417
- name: Upload release asset

REGGIE.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -213,19 +213,20 @@ Convergence tests (temporally by varying the time step) for integrating the path
213213

214214
Testing more complex DSMC routines: [Link CMAKE-CONFIG](regressioncheck/NIG_DSMC/builds.ini).
215215

216-
| **No.** | **Case** | **CMAKE-CONFIG** | **Feature** | **Execution** | **Comparing** | **Readme** |
217-
| :-----: | :--------------------------: | :--------------: | :----------------------------------------------------------------: | :----------------: | :---------------------------------------------------------------: | :---------------------------------------------------------------------: |
218-
| 1 | 2D_VTS_Distribution | Release | | nProcs=1,2,4 | h5diff ElemTimeStep | [Link](regressioncheck/NIG_DSMC/2D_VTS_Distribution/readme.md) |
219-
| 2 | Ambipolar_Diffusion | Release | | nProcs=6 | PartAnalyze.csv | [Link](regressioncheck/NIG_DSMC/Ambipolar_Diffusion/readme.md) |
220-
| 3 | Macroscopic_Restart | Release | | nProcs=6 | PartAnalyze.csv | [Link](regressioncheck/NIG_DSMC/Macroscopic_Restart/readme.md) |
221-
| | MCC_BGG_Elec_XSec_Sampling | Release | Cell-local sampling of electronic excitation rate | nProcs=2,5 | ExcitationData in DSMCState | [Link](regressioncheck/NIG_DSMC/MCC_BGG_Elec_XSec_Sampling/readme.md) |
222-
| 4 | RotPeriodicBC | Release | One rot-periodic BC angle | nProcs=1,2,7,15,25 | h5 bounds check PartData and PartAnalyze.csv | [Link](regressioncheck/NIG_DSMC/RotPeriodicBC/readme.md) |
223-
| 5 | RotPeriodicBCMulti | Release | Multiple rot-periodic BC angles and interplane | nProcs=1,2,7,15,25 | h5 bounds check PartData, PartAnalyze.csv, and min/max of rot BCs | [Link](regressioncheck/NIG_DSMC/RotPeriodicBCMulti/readme.md) |
224-
| 5 | RotPeriodicBCMultiInterPlane | Release | (same as RotPeriodicBCMulti) | nProcs=1,2,7,15,25 | position of interplanes | [Link](regressioncheck/NIG_DSMC/RotPeriodicBCMultiInterPlane/readme.md) |
225-
| 5 | SURF_PROB_DifferentProbs | Release | Probability-based surface chemistry model: Different probabilities | nProcs=3,6 | Number density of product species | [Link](regressioncheck/NIG_DSMC/SURF_PROB_DifferentProbs/readme.md) |
226-
| 5 | SURF_PROB_MultiReac | Release | Probability-based surface chemistry model: Multiple reactions | nProcs=3,6 | Number density of product species | [Link](regressioncheck/NIG_DSMC/SURF_PROB_MultiReac/readme.md) |
227-
| 6 | VirtualCellMerge | Release | Merge cells for collision operator | nProcs=4 | DSMCState: Number density with absolute value | [Link](regressioncheck/NIG_DSMC/VirtualCellMerge/readme.md) |
228-
| 7 | VSS_VHS_SelfDiffusion | Release + Debug | Testing the VHS/VSS collision model | nProcs=6 | Number Density | [Link](regressioncheck/NIG_DSMC/VSS_VHS_SelfDiffusion/readme.md) |
216+
| **No.** | **Case** | **CMAKE-CONFIG** | **Feature** | **Execution** | **Comparing** | **Readme** |
217+
| :-----: | :-----------------------------: | :--------------: | :----------------------------------------------------------------: | :----------------: | :---------------------------------------------------------------: | :------------------------------------------------------------------------: |
218+
| 1 | 2D_VTS_Distribution | Release | | nProcs=1,2,4 | h5diff ElemTimeStep | [Link](regressioncheck/NIG_DSMC/2D_VTS_Distribution/readme.md) |
219+
| 2 | Ambipolar_Diffusion | Release | | nProcs=6 | PartAnalyze.csv | [Link](regressioncheck/NIG_DSMC/Ambipolar_Diffusion/readme.md) |
220+
| | BC_InnerReflective_2DAxi_8elems | | Inner reflective BC (dielectric surfaces) | nProcs=1,2,4,8 | h5diff: DSMCSurfState (Spec001_SimPartPerIter) | [Link](regressioncheck/NIG_DSMC/BC_InnerReflective_2DAxi_8elems/readme.md) |
221+
| 3 | Macroscopic_Restart | Release | | nProcs=6 | PartAnalyze.csv | [Link](regressioncheck/NIG_DSMC/Macroscopic_Restart/readme.md) |
222+
| | MCC_BGG_Elec_XSec_Sampling | Release | Cell-local sampling of electronic excitation rate | nProcs=2,5 | ExcitationData in DSMCState | [Link](regressioncheck/NIG_DSMC/MCC_BGG_Elec_XSec_Sampling/readme.md) |
223+
| 4 | RotPeriodicBC | Release | One rot-periodic BC angle | nProcs=1,2,7,15,25 | h5 bounds check PartData and PartAnalyze.csv | [Link](regressioncheck/NIG_DSMC/RotPeriodicBC/readme.md) |
224+
| 5 | RotPeriodicBCMulti | Release | Multiple rot-periodic BC angles and interplane | nProcs=1,2,7,15,25 | h5 bounds check PartData, PartAnalyze.csv, and min/max of rot BCs | [Link](regressioncheck/NIG_DSMC/RotPeriodicBCMulti/readme.md) |
225+
| 5 | RotPeriodicBCMultiInterPlane | Release | (same as RotPeriodicBCMulti) | nProcs=1,2,7,15,25 | position of interplanes | [Link](regressioncheck/NIG_DSMC/RotPeriodicBCMultiInterPlane/readme.md) |
226+
| 5 | SURF_PROB_DifferentProbs | Release | Probability-based surface chemistry model: Different probabilities | nProcs=3,6 | Number density of product species | [Link](regressioncheck/NIG_DSMC/SURF_PROB_DifferentProbs/readme.md) |
227+
| 5 | SURF_PROB_MultiReac | Release | Probability-based surface chemistry model: Multiple reactions | nProcs=3,6 | Number density of product species | [Link](regressioncheck/NIG_DSMC/SURF_PROB_MultiReac/readme.md) |
228+
| 6 | VirtualCellMerge | Release | Merge cells for collision operator | nProcs=4 | DSMCState: Number density with absolute value | [Link](regressioncheck/NIG_DSMC/VirtualCellMerge/readme.md) |
229+
| 7 | VSS_VHS_SelfDiffusion | Release + Debug | Testing the VHS/VSS collision model | nProcs=6 | Number Density | [Link](regressioncheck/NIG_DSMC/VSS_VHS_SelfDiffusion/readme.md) |
229230

230231

231232
### NIG_Dielectric

docs/documentation/userguide/features-and-models/DSMC.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ Define the size in [m], mass in [kg] of the solid particle (perfectly spherical)
451451
Part-Species1-MacroParticleFactor
452452

453453
The weighting factor can differ from the weighting factor of gas species and does not depend on the usage of a variable weighting factor for gas species.
454-
The energy transferred from the gas flow to the solid particle also depends on the thermal accommodation coefficient of the solid particle surface and is provided by the user as follows:
454+
The energy transferred from the gas flow to the solid particle depends on the thermal accommodation coefficient of the solid particle surface and is provided by the user per gas-phase species by
455455

456-
Part-Species1-GranularPartTau = 1.0
457-
458-
To correctly calculate the temperature development of granular species, specify their specific heat capacity in J/(kg K):
456+
Part-Species2-GranularPartTau = 1.0
457+
458+
assuming that the second species is a gas species. To correctly calculate the temperature development of granular species, specify their specific heat capacity in J/(kg K):
459459

460460
Part-Species1-GranularPartCsp = 765
461461

docs/documentation/userguide/features-and-models/features-particle-solver.md

Lines changed: 117 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ To enable axisymmetric simulations, the following flag is required
163163
To fully exploit rotational symmetry, a radial weighting can be enabled, which will linearly increase the weighting factor $w$
164164
towards $y_{\mathrm{max}}$ (i.e. the domain border in $y$-direction), depending on the current $y$-position of the particle.
165165

166-
Particles-RadialWeighting=T
167-
Particles-RadialWeighting-PartScaleFactor=100
166+
Part-Weight-Type = radial
167+
Part-Weight-Radial-ScaleFactor = 100
168168

169169
A radial weighting factor of 100 means that the weighting factor at $y_{\mathrm{max}}$ will be $100w$. Although greatly reducing
170170
the number of particles, this introduces the need to delete and create (in the following "clone") particles, which travel upwards
@@ -185,8 +185,8 @@ For the cloning procedure, two methods are implemented, where the information of
185185
given number of iterations (`CloneDelay=10`) and inserted at the old position. The difference is whether the list is inserted
186186
chronologically (`CloneMode=1`) or randomly (`CloneMode=2`) after the first number of delay iterations.
187187

188-
Particles-RadialWeighting-CloneMode=2
189-
Particles-RadialWeighting-CloneDelay=10
188+
Part-Weight-CloneMode=2
189+
Part-Weight-CloneDelay=10
190190

191191
This serves the purpose to avoid the so-called particle avalanche phenomenon {cite}`Galitzine2015`, where clones travel on the
192192
exactly same path as the original in the direction of a decreasing weight. They have a zero relative velocity (due to the same
@@ -203,11 +203,11 @@ visible in the free-stream in the cells downstream, when using mortar elements,
203203
the rotational axis. It can be avoided by splitting the surface flux emission side into multiple subsides with the following flag
204204
(default value is 20)
205205

206-
Particles-RadialWeighting-SurfFluxSubSides = 20
206+
Part-Weight-SurfFluxSubSides = 20
207207

208208
An alternative to the particle position-based weighting is the cell-local radial weighting, which can be enabled by
209209

210-
Particles-RadialWeighting-CellLocalWeighting = T
210+
Part-Weight-UseCellAverage = T
211211

212212
However, this method is not preferable if the cell dimensions in $y$-direction are large, resulting in numerical artifacts due to
213213
the clustered cloning processes at cell boundaries.
@@ -234,7 +234,117 @@ only at the stagnation point, the time step defined during the initialization is
234234
(sec:variable-particle-weighting)=
235235
## Variable Particle Weighting
236236

237-
Variable particle weighting is currently supported for PIC (with and without background gas) or a background gas (an additional trace species feature is described in Section {ref}`sec:background-gas`). The general functionality can be enabled with the following flag:
237+
The particle weighting scheme for DSMC, BGK, and FP simulations can be defined by
238+
239+
Part-Weight-Type = constant
240+
241+
The available options are described in the table below.
242+
243+
| Type | Description |
244+
| ---------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
245+
| constant | Default case, constant weighting as set by `Part-Species$-MacroParticleFactor` |
246+
| radial | Radial weighting in y-direcition for the axisymmetric simulation based on the particle position, see Section {ref}`sec:2D-axisymmetric` |
247+
| linear | Linear weighting along an axis or user-defined vector, see Section {ref}`sec:linear-particle-weighting` |
248+
| cell_local | Cell-local weighting distribution, based on previous simulation results, see Section {ref}`sec:celllocal-particle-weighting` |
249+
250+
An additional type of variable particle weighting scheme *split & merge*, currently only available for PIC simulations, is described in Section {ref}`sec:split-merge`.
251+
252+
(sec:linear-particle-weighting)=
253+
### Linear Weighting in 3D
254+
255+
Linearly increasing particle weights in 3D can be defined similarly to the radial weighting in the 2D axisymmetric case.
256+
257+
Part-Weight-Type = linear
258+
259+
As a first step, the scaling direction needs to be defined, either as one of the coordinate axes
260+
261+
Part-Weight-Linear-CoordinateAxis = 2 ! y-axis
262+
263+
or by start and end coordinates from which a scaling vector is generated
264+
265+
Part-Weight-Linear-StartPointForScaling = (/0,0,0/)
266+
Part-Weight-Linear-EndPointForScaling = (/1,1,1/)
267+
268+
In each case, scaling points with a given particle weight can be defined along the axis or the vector. The weight between two scaling points is then linearly interpolated based on the relative particle position (a value between 0 and 1). If the weight is to be increased along one of the coordinate axes, the absolute position [m] has to be given for the scaling points.
269+
270+
In the example below, the weights are increased from $10^8$ to $10^{10}$, over a length of 1 cm along the axes.
271+
272+
Part-Weight-Linear-nScalePoints = 2
273+
274+
Part-Weight-Linear-ScalePoint1-Coordinate = 0.0
275+
Part-Weight-Linear-ScalePoint1-Factor = 1E8
276+
277+
Part-Weight-Linear-ScalePoint2-Coordinate = 0.01
278+
Part-Weight-Linear-ScalePoint2-Factor = 1E10
279+
280+
Analogously to the radial weighting, the particles will be cloned or deleted when they move to a new cell with a different weighting factor. It should be noted that while a change of the scaling parameters between simulation runs is possible, it is recommended to perform a macroscopic restart (see Section {ref}`sec:macroscopic-restart`) to avoid large jumps in the weighting factor distribution during the first iteration.
281+
282+
The cloning and deletion probability is again calculated by:
283+
284+
$$ P_{\mathrm{clone}} = \frac{w_{\mathrm{old}}}{w_{\mathrm{new}}} - \mathrm{INT}\left(\frac{w_{\mathrm{old}}}{w_{\mathrm{new}}}\right)\qquad \text{for}\quad w_{\mathrm{new}}<w_{\mathrm{old}}.$$
285+
286+
$$ P_{\mathrm{delete}} = 1 - P_{\mathrm{clone}}\qquad \text{for}\quad w_{\mathrm{old}}<w_{\mathrm{new}}.$$
287+
288+
The same parameters as for radial weighting can be utilized for the linear weighting:
289+
290+
Part-Weight-CloneMode=2
291+
Part-Weight-CloneDelay=10
292+
Part-Weight-SurfFluxSubSides = 20
293+
Part-Weight-UseCellAverage = T
294+
295+
A detailed description of these parameters can be found in Section {ref}`sec:2D-axisymmetric`.
296+
297+
(sec:celllocal-particle-weighting)=
298+
### Cell-local Weighting
299+
300+
An automatic determination of the optimal particle weights in each cell can be performed during a macroscopic restart (see Section {ref}`sec:macroscopic-restart`), starting from a simulation with constant, radial or linear weighting. The process is enabled by
301+
302+
Part-Weight-Type = cell_local
303+
304+
The adaption is based on multiple criteria. If a quality factor {ref}`sec:DSMC-quality` is not resolved in a cell, the weighting factor is lowered. For a 3D case, the following equation is used to set the bound of the weight.
305+
306+
$$w < \frac{1}{\left(\sqrt{2}\pi d_{\mathrm{ref}}^2 n^{2/3}\right)^3}$$
307+
308+
The threshold for the adaption is set by
309+
310+
Part-Weight-CellLocal-QualityFactor = 0.8
311+
312+
which in case of DSMC corresponds to the mean collision separation distance over mean free path (DSMC_MCS_over_MFP) and for BGK/FP to the maximal relaxation factor (BGK_MaxRelaxationFactor/FP_MaxRelaxationFactor). If the read-in cell values from the DSMCState are above this threshold the weighting factor will be adapted to resolve it. For DSMC, the scaling factor is put to the power of 3 for 3D and 2 for 2D to increase the number of particles and thus the resolution of the mean collision separation distance accordingly.
313+
314+
If all quality factors are resolved, the weight is adapted in such a way, that the simulation particle numbers stay in a predefined range.
315+
316+
Part-Weight-CellLocal-MinParticleNumber = 10
317+
Part-Weight-CellLocal-MaxParticleNumber = 100
318+
319+
A further refinement, with a higher minimum particle number can be additionally given close to the symmetry axis in axisymmetric simulations (determined by using 5% of the maximum y-coordinate of the domain) or close to catalytic boundaries.
320+
321+
Part-Weight-CellLocal-SymAxis-MinPartNum = 200
322+
Part-Weight-CellLocal-Cat-MinPartNum = 200
323+
324+
For coupled BGK/FP-DSMC simulations, additional parameters are available to scale the weight in the BGK/FP regions respectively, where the other criteria shown above are resolved. The following parameters are directly multiplied by read-in weighting factor:
325+
326+
Part-Weight-CellLocal-RefineFactorBGK = 10
327+
Part-Weight-CellLocal-RefineFactorFP = 10
328+
329+
These values would correspond to an increase of the weighting factor of 10 and thus a reduction of the particle number in the BGK/FP regions. In addition, the upper limit of the weights can be disabled for simulations in which the weight should only be lowered.
330+
331+
Part-Weight-CellLocal-IncludeMaxPartNum = F
332+
333+
To avoid large jumps in the optimal weight between neighboring cells, a median filtering routine can be applied, together with the number of times that the algorithm should be called.
334+
335+
Part-Weight-CellLocal-ApplyMedianFilter = T
336+
Part-Weight-CellLocal-RefinementNumber = 2
337+
338+
If a restart should be performed from an already adapted simulation, without further optimization of the weights, the following flag can be set in the input file.
339+
340+
Part-Weight-CellLocal-SkipAdaption = T
341+
342+
In this case, the weight distribution from the given restart files is read in and used. As for the linear weighting in 3D, particles are cloned or deleted with a given probability when moving to a new cell.
343+
344+
(sec:split-merge)=
345+
### Split-And-Merge
346+
347+
Variable particle weighting based on a split and merge algorithm is currently supported for PIC (with and without background gas) or a background gas (an additional trace species feature is described in Section {ref}`sec:background-gas`). The general functionality can be enabled with the following flag:
238348

239349
Part-vMPF = T
240350

0 commit comments

Comments
 (0)