Skip to content

Commit

Permalink
Merge branch 'master.dev' of piclas.boltzplatz.eu:piclas/piclas into …
Browse files Browse the repository at this point in the history
…feature.HDG_petsc
  • Loading branch information
scopplestone committed Feb 5, 2023
2 parents 1bbd81d + 309d2df commit c40c51e
Show file tree
Hide file tree
Showing 208 changed files with 719 additions and 36,751 deletions.
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,25 +373,25 @@ poisson_release:
<<: *defaults_poisson
stage: reggie_checkin
script:
- cd build_poisson_release ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson/poisson -e ./bin/piclas
- cd build_poisson_release ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson -e ./bin/piclas

poisson_debug:
<<: *defaults_poisson
stage: reggie_checkin
script:
- cd build_poisson_debug ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson/poisson -e ./bin/piclas
- cd build_poisson_debug ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson -e ./bin/piclas

poisson_petsc_release:
<<: *defaults_poisson_petsc
stage: reggie_checkin
script:
- cd build_poisson_petsc_release ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson/poisson -e ./bin/piclas
- cd build_poisson_petsc_release ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson -e ./bin/piclas

poisson_petsc_debug:
<<: *defaults_poisson_petsc
stage: reggie_checkin
script:
- cd build_poisson_petsc_debug ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson/poisson -e ./bin/piclas
- cd build_poisson_petsc_debug ; python ./reggie/reggie.py ../regressioncheck/CHE_poisson -e ./bin/piclas


# ----------------------------------------------------------------------------------------------------------------------------------------------------
Expand Down
13 changes: 10 additions & 3 deletions CMakeListsLib.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,16 @@ IF(NOT LIBS_BUILD_MATH_LIB)
ENDIF()

# VDM inverse, replace lapack with analytical solution
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND "${CMAKE_HOSTNAME}" MATCHES "login" AND "${LSB_RELEASE_ID_SHORT}" MATCHES "CentOS")
MESSAGE(STATUS "Compiling PICLas in debug mode on Hawk with system math lib. Setting VDM inverse to analytical solution")
ADD_DEFINITIONS(-DVDM_ANALYTICAL)
# HLRS HAWK / SuperMUC + DEBUG
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND "${CMAKE_HOSTNAME}" MATCHES "login")
# HAWK and SuperMUC name their login nodes identically, so use the Fully Qualified Domain Name (FQDN) to identify
CMAKE_HOST_SYSTEM_INFORMATION(RESULT FQDN QUERY FQDN)
MARK_AS_ADVANCED(FORCE FQDN)
# HLRS HAWK
IF ("${FQDN}" MATCHES "hawk.hww.hlrs.de")
MESSAGE(STATUS "Compiling PICLas in debug mode on Hawk with system math lib. Setting VDM inverse to analytical solution")
ADD_DEFINITIONS(-DVDM_ANALYTICAL)
ENDIF()
ENDIF()

# Build LAPACK/OpenBLAS in FLEXI
Expand Down
10 changes: 5 additions & 5 deletions REGGIE.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ Testing PIC compiled with Leapfrog integration (poisson,Leapfrog), solving Poiss

Testing PIC compiled with Boris-Leapfrog integration (poisson,Boris-Leapfrog), solving Poisson's equation: [Link to build](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/builds.ini).

| **No.** | **Case** | **CMAKE-CONFIG** | **Feature** | **Execution** | **Comparing** | **Readme** |
| :-----: | :------------: | :------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :--------------------------------------------------------------------: | :-----------------------------------------------------------------------------: |
| 1 | 2D_HET_Liu2010 | CMAKE_BUILD_TYPE = Release,Debug | 2D Poisson-PIC, BGGas distribution, null collision on/off, pre-defined external magnetic field, neutralization BC, SEE model with variable electron bulk temperature | nProcs=3,6,12 | integrate number of electrons impinging the anode (SurfaceAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/2D_HET_Liu2010/readme.md) |
| 2 | 2D_Landmark | CMAKE_BUILD_TYPE = Release,Debug | 2D Poisson-PIC, emission models for Landmark (volumetric ionization and neutralizer) | nProcs=4 | integrate number of electrons impinging the anode (SurfaceAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/2D_Landmark/readme.md) |
| 3 | 3D_HET_Liu2010 | CMAKE_BUILD_TYPE = Release,Debug | 3D Poisson-PIC, BGGas distribution, null collision on/off, pre-defined external magnetic field, neutralization BC, SEE model with variable electron bulk temperature, dielectric surface charging (hollow cylinder), vMPF=T restart from vMPF=F restart file | nProcs=6 | integrate number of electrons impinging the anode (SurfaceAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/3D_HET_Liu2010/readme.md) |
| **No.** | **Case** | **CMAKE-CONFIG** | **Feature** | **Execution** | **Comparing** | **Readme** |
| :-----: | :------------: | :---------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------: | :--------------------------------------------------------------------: | :-----------------------------------------------------------------------------: |
| 1 | 2D_HET_Liu2010 | | 2D Poisson-PIC, BGGas distribution, null collision on/off, pre-defined external magnetic field, neutralization BC, SEE model with variable electron bulk temperature, particle flux, total electric current and emitted SEE over time into SurfaceAnalyze.csv | nProcs=3,6,12 | integrate number of electrons impinging the anode (SurfaceAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/2D_HET_Liu2010/readme.md) |
| 2 | 2D_Landmark | | 2D Poisson-PIC, emission models for Landmark (volumetric ionization and neutralizer) | nProcs=4 | integrate number of electrons impinging the anode (SurfaceAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/2D_Landmark/readme.md) |
| 3 | 3D_HET_Liu2010 | | 3D Poisson-PIC, BGGas distribution, null collision on/off, pre-defined external magnetic field, neutralization BC, SEE model with variable electron bulk temperature, dielectric surface charging (hollow cylinder), vMPF=T restart from vMPF=F restart file | nProcs=6 | integrate number of electrons impinging the anode (SurfaceAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_Boris-Leapfrog/3D_HET_Liu2010/readme.md) |

### NIG_PIC_poisson_RK3

Expand Down
9 changes: 8 additions & 1 deletion docs/documentation/userguide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,18 @@ For convenience, you can add these lines to your `.bashrc`.
(sec:petsc-installation)=
### Installing PETSc

The following list contains the **recommended/working library versions** for PETSc and PICLas

| PICLas Version | 3.18 | 3.17 |
| :------------: | :-------: | :-------: |
| 3.0.0 | yes | yes |
| 2.9.0 | no | yes |

#### Local machine
Download PETSc from the git repository

````
git clone -b main https://gitlab.com/petsc/petsc.git petsc
git clone -b release-3.17 https://gitlab.com/petsc/petsc.git petsc
````

Configure and install PETSc (MPI and BLAS/LAPACK have to be installed)
Expand Down
50 changes: 48 additions & 2 deletions docs/documentation/userguide/visu_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,54 @@ impact angle of $0^{\circ}$), number of real particle impacts over the sampling
per area per second.

## Integral Variables

WIP, PartAnalyze/FieldAnalyze
This analysis measures integral values from the field- and/or particle-solver data over time and writes different .csv files.

### Field Variables
**WIP**

### Particle Variables
**WIP**

### Surface Variables

The output for different measurements involving particles and surfaces is written to *SurfaceAnalyze.csv*.
If this analysis is not required in each time step, the parameter `Surface-AnalyzeStep` (default is 1) can be set to an integer
greater or equal 1. Some values are sampled only during one time step and others are accumulated over the number of time steps
defined by `Surface-AnalyzeStep`.
The number of time steps over which the values are calculated is controlled with `Surface-AnalyzeStep` (default is 1).

| Parameter | Parameter |
| ---------------------------- | ---------------------------------------------------------------------------- |
| `CalcElectronSEE` | Secondary electron emission current for each `Part-Boundary` with SEE model |
| `CalcBoundaryParticleOutput` | Particle flux for each user-defined `Part-Boundary` and `Part-Species` |

**Secondary Electron Emission**
When `CalcElectronSEE=T` is activated, the secondary electron emission current (on all surfaces where such a model is used) is
calculated and written to *SurfaceAnalyze.csv*. Note that all secondary electrons between two outputs are accumulated and divided by
the time difference between these outputs. Hence, the averaging time can be adjusted using `Surface-AnalyzeStep`.
The output in the .csv file will be similar to this example: `012-ElectricCurrentSEE-BC_WALL`

**BoundaryParticleOutput (BPO)** The flux of particles crossing boundaries where they are removed can be calculated by setting
`CalcBoundaryParticleOutput = T`. Additionally, the boundaries and species IDs must be supplied for which the output is to be
created. This is done by setting

CalcBoundaryParticleOutput = T ! Activate the analysis
BPO-NPartBoundaries = 2 ! Nbr of particle boundaries where the flux and current are measured
BPO-PartBoundaries = (/4,8/) ! Only measure the flux and current on Part-Boundary4 and Part-Boundary8
BPO-NSpecies = 2 ! Nbr of species that are considered for Part-Boundary4 and Part-Boundary8
BPO-Species = (/2,3/) ! Species IDs which should be included

where the number of boundaries and species as well as the corresponding IDs are defined. The other boundaries and species IDs will
be ignored. Note that this feature is currently only implemented for boundaries of type `Part-BoundaryX-Condition = open` and
`Part-BoundaryX-Condition = reflective`. The reflective BC must also use either species swap via `Part-BoundaryX-NbrOfSpeciesSwaps`
or a secondary electron emission surface model via `Part-BoundaryX-SurfaceModel`.
The output in the .csv file will be similar to this example: `004-Flux-Spec-002-BC_CATHODE`
Additionally, the total electric current will be calculated if any species that is selected via `BPO-Species` carries a charge
unequal to zero.
Note that only species defined via `BPO-Species` will be considered in the calculation of the total electric current.
Furthermore, the secondary electron emission current is automatically added to the total electric current if
`CalcBoundaryParticleOutput = T`.
The output of the total electric current in the .csv file will be similar to this example: `008-TotalElectricCurrent-BC_ANODE`

## Dynamic Mode Decomposition
The dynamic mode decomposition is an algorithm that divides a temporal series into a set of modes which are associated with a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ Part-nSpecies=1
Part-nBounds=6
Part-Boundary1-SourceName = BC_Xplus
Part-Boundary1-Condition = reflective
Part-Boundary1-NbrOfSpeciesSwaps = 1
Part-Boundary1-SpeciesSwaps1 = (/1,0/)

Part-Boundary2-SourceName = BC_Xminus
Part-Boundary2-Condition = reflective

Part-Boundary2-WallTemp = 2700, 2635.24
Part-Boundary3-SourceName = BC_Yplus
Part-Boundary3-Condition = symmetric
Expand All @@ -72,6 +76,12 @@ Part-Boundary5-Condition = symmetric
Part-Boundary6-SourceName = BC_Zminus
Part-Boundary6-Condition = symmetric
Part-FIBGMdeltas=(/1e-2,1e-2,1e-2/)

CalcBoundaryParticleOutput = T
BPO-NPartBoundaries = 1 ! Nbr of bounaries
BPO-PartBoundaries = (/1/) ! Part-Boundary1 and Part-Boundary2
BPO-NSpecies = 1 ! Nbr of species
BPO-Species = (/1/) ! electrons
! =============================================================================== !
! Species1 - electron
! =============================================================================== !
Expand All @@ -98,4 +108,4 @@ nocrosscombination:Part-Boundary2-WallTemp, Part-Species1-Surfaceflux1-Thermioni
Particles-HaloEpsVelo=2.0E+07
Part-NumberOfRandomSeeds=2
Particles-RandomSeed1=1
Particles-RandomSeed2=2
Particles-RandomSeed2=2
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
* Schottky effect reduces the work function (and thus the required wall temperature)
* Comparing the calculated current to the expected value of the Richardson Dushman equation for Tungsten
* Input: W = 4.54 eV, A = 60 A/(cm^2 K^2), T_w = 2700 K (without Schottky), T_w = 2635.24 K
* Output: j = 1.47 A / cm^2 -> I = 1.4675 eV (A = 1 cm^2)
* Output: j = 1.47 A / cm^2 -> I = 1.4675 A (A = 1 cm^2)
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
001-TIME,002-nRealPartOut-Spec-002-BC_left
0.6000000000000000E-008,0.3000000000000000E+003
001-TIME,002-Flux-Spec-002-BC_left,003-TotalElectricCurrent-BC_left,004-ElectricCurrentSEE-BC_right
0.6000000000000000E-008,0.4200000000000136E+013,-.6729141426000218E-006,0.0000000000000000E+000
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
001-TIME,002-Flux-Spec-002-BC_ANODE,003-Flux-Spec-003-BC_ANODE,004-Flux-Spec-002-BC_CATHODE,005-Flux-Spec-003-BC_CATHODE,006-Flux-Spec-002-BC_WALL,007-Flux-Spec-003-BC_WALL,008-TotalElectricCurrent-BC_ANODE,009-TotalElectricCurrent-BC_CATHODE,010-TotalElectricCurrent-BC_WALL,011-NeutralizationParticles,012-ElectricCurrentSEE-BC_WALL
0.5000000000000000E-008,0.1007999999999993E+016,0.0000000000000000E+000,0.1329999999999990E+016,0.9999999999999927E+012,0.4979999999999964E+015,0.1999999999999985E+013,-.1614993942239988E-003,-.2129292608369985E-003,0.1228869398509989E-003,0.7700000000000000E+002,0.2023548957389984E-003
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
001-TIME,002-Flux-Spec-002-BC_ANODE,003-Flux-Spec-003-BC_ANODE,004-Flux-Spec-002-BC_CATHODE,005-Flux-Spec-003-BC_CATHODE,006-Flux-Spec-002-BC_WALL,007-Flux-Spec-003-BC_WALL,008-TotalElectricCurrent-BC_ANODE,009-TotalElectricCurrent-BC_CATHODE,010-TotalElectricCurrent-BC_WALL,011-NeutralizationParticles,012-ElectricCurrentSEE-BC_WALL
0.5000000000000000E-008,0.9049999999999934E+015,0.0000000000000000E+000,0.2809999999999979E+015,0.0000000000000000E+000,0.5399999999999961E+015,0.1999999999999985E+013,-.1449969759649989E-003,-.4502116049299967E-004,0.1091082216929991E-003,0.1900000000000000E+002,0.1953053190069984E-003
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
! integrate the number of electrons impinging on the anode
! Integrate the number of electrons impinging on the anode
integrate_line_file = SurfaceAnalyze.csv ! Data file name
integrate_line_columns = 0:1 ! Columns x:y for integration y over x
integrate_line_integral_value = 0.000118725 ! Number of removed electrons through the anode BC: integrated value from the first single-core simulation
integrate_line_columns = 0:1 ! Columns x:y for integration y over x, .i.e., 002-Flux-Spec-002-BC_ANODE over 001-TIME
integrate_line_integral_value = 1.984805e6 ! Number of removed electrons through the anode BC per sec
! ! integrated value from the first single-core simulation
integrate_line_tolerance_value = 15e-2 ! Tolerance (largest difference was observed to be 12.36% on reggie server)
integrate_line_tolerance_type = relative ! Relative or absolute tolerance


! Check last line in .csv file and compare to reference file
! Note that the tolerance is quite high due to the low number of particles which reduces the computational demand for this test
compare_data_file_name = SurfaceAnalyze.csv , SurfaceAnalyze.csv
compare_data_file_reference = SurfaceAnalyze_refA.csv , SurfaceAnalyze_refB.csv
compare_data_file_tolerance = 30e-2 , 50e-2
compare_data_file_tolerance_type = relative , relative
compare_data_file_max_differences = 4 , 4
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ CalcPointsPerDebyeLength = T
Particles-DSMC-CalcQualityFactors = T

CalcBoundaryParticleOutput = T
BPO-NPartBoundaries = 2 ! Nbr of boundaries
BPO-PartBoundaries = (/1,2/) ! Part-Boundary1 and Part-Boundary2
BPO-NPartBoundaries = 3 ! Nbr of boundaries
BPO-PartBoundaries = (/1,2,3/) ! Part-Boundary1 and Part-Boundary2
BPO-NSpecies = 2 ! Nbr of species
BPO-Species = (/2,3/) ! electrons, Xe+

Surface-AnalyzeStep = 10

CalcElectronSEE = T

TimeStampLength = 16
! =============================================================================== !
! CALCULATION
Expand Down Expand Up @@ -140,6 +144,7 @@ Part-SurfaceModel-SEE-Te = 5.80226250308285e5 ! Electron temperature
Part-SurfaceModel-SEE-Te-automatic = T
Part-SurfaceModel-SEE-Te-Spec = 2


Part-Boundary4-SourceName = BC_periodicz+
Part-Boundary4-Condition = periodic

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@
Part-SurfaceModel-SEE-Te-automatic = T ! Instead of using a fixed bulk electron temperature, determine the global temperature of the defined species (default is False). Note that Part-SurfaceModel-SEE-Te is used as initial value.
Part-SurfaceModel-SEE-Te-Spec = 2 ! For automatic bulk Te determination, state the species ID of the electrons

- Neutralization emission BC via keeping the exiting charge at the right BC zero over time (averged)
- Neutralization emission BC via keeping the exiting charge at the right BC zero over time (averaged)

Part-Species2-Init2-SpaceIC = 2D_Liu2010_neutralization

or by enforcing a neutral boundary layer at the right exit by emitting electrons if there is an ion surplus in the first row of
elements

Part-Species2-Init2-SpaceIC = 2D_Liu2010_neutralization_Szabo

- Output of particle flux, total electric current and emitted SEE over time into SurfaceAnalyze.csv for particle boundaries 1,2 and 3via

CalcBoundaryParticleOutput = T
BPO-NPartBoundaries = 3 ! Nbr of boundaries
BPO-PartBoundaries = (/1,2,3/) ! Part-Boundary1 to Part-Boundary3
BPO-NSpecies = 2 ! Nbr of species
BPO-Species = (/2,3/) ! electrons, Xe+
Loading

0 comments on commit c40c51e

Please sign in to comment.