Skip to content

Commit

Permalink
Merge branch 'feature.coupled.power.AC.and.bias.voltage' into 'master…
Browse files Browse the repository at this point in the history
….dev'

[feature.coupled.power.AC.and.bias.voltage] AC power control + bias voltage

See merge request piclas/piclas!807
  • Loading branch information
pnizenkov committed May 2, 2023
2 parents 1290e40 + 89ec290 commit 9860da2
Show file tree
Hide file tree
Showing 26 changed files with 508 additions and 258 deletions.
2 changes: 1 addition & 1 deletion REGGIE.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ Testing PIC compiled with Runge-Kutta 3 integration, solving Poisson's equation:
| 6 | plasma_sheath_BR-electrons_conforming_auto-switch_variable_Te | | non-linear HDG (BR electrons), automatic switching BR/kinetic, variable Te, change nSkipAnalyze during the simulation | nProcs=1,2,4,11 | integrate Te over time (PartAnalyze.csv) | [Link](regressioncheck/NIG_PIC_poisson_RK3-electrons_conforming/plasma_sheath_BR-electrons_conforming_auto-switch_variable_Te/readme.md) |
| 7 | plasma_sheath_BR-electrons_mortar | | non-linear HDG (BR electrons), Mortars | nProcs=2 | TimeAvg | [Link](regressioncheck/NIG_PIC_poisson_RK3-electrons_conforming/plasma_sheath_BR-electrons_mortar/readme.md) |
| 8 | turner | | | nProcs=4 | L2 error, PartAnalyze.csv | |
| 9 | turner_bias-voltage_AC-DC | | bias voltage for AC and DC potential boundaries (BCType=50) | nProcs=1,2,4,10 | PartAnalyze.csv, SurfaceAnalyze.csv | [Link](regressioncheck/NIG_PIC_poisson_RK3/turner_bias-voltage_AC-DC/readme.md) |
| 9 | turner_bias-voltage_AC-DC | | bias voltage for AC with BCType=51 and 52 (power control) and DC with BCType=50 potential boundaries | nProcs=1,2,4,10 | PartAnalyze.csv, SurfaceAnalyze.csv | [Link](regressioncheck/NIG_PIC_poisson_RK3/turner_bias-voltage_AC-DC/readme.md) |

### NIG_PIC_maxwell_RK4

Expand Down
194 changes: 113 additions & 81 deletions docs/documentation/userguide/features-and-models/BC-field-solver.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
! --- Externals Tool Reggie
MPI = 1 , 1
externalbinary = ./hopr/build/bin/hopr , ./hopr/build/bin/hopr
externaldirectory = pre-hopr-DC , pre-hopr-AC
externalruntime = pre , pre
cmd_pre_execute = ln\s-s\s./pre-hopr-DC/parallel_plates_BCType2_DC_mesh.h5\s../. , ln\s-s\s./pre-hopr-AC/parallel_plates_BCType60_AC_mesh.h5\s../.

nocrosscombination:MPI,externalbinary,externaldirectory,externalruntime,cmd_pre_execute

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GeometricNGeo = 1 ! Degree of mesh representation
! =============================================================================== !
! MESH
! =============================================================================== !
MeshFile = parallel_plates_mesh.h5
MeshFile = parallel_plates_BCType2_DC_mesh.h5,parallel_plates_BCType60_AC_mesh.h5
useCurveds = F
! =============================================================================== !
! OUTPUT / VISUALIZATION
Expand Down Expand Up @@ -46,8 +46,13 @@ VisuParticles = T
! =============================================================================== !
! Field Boundaries
! =============================================================================== !
roundaryName = BC_right ! Adjust the right BC automatically depending on the actually input power
BoundaryType = (/2,2/) ! 2: Dirichlet with automatically adjusted electric potential
! This BC is set directly in the two hopr.ini files
!roundaryName = BC_right ! Adjust the right BC automatically depending on the actually input power
!BoundaryType = (/2,2/) ! 2: Dirichlet with automatically adjusted electric potential

! The refstate for the AC case must be defined here
!RefState = (/10.0 , 3e9 , -1.57079632679/) ! RefState Nbr 1: Voltage, Frequency and Phase shift
RefState = (/1000.0 , 0.0 , 0.0/) ! RefState Nbr 1: Voltage, Frequency and Phase shift

CoupledPowerPotential = (/10. , 1000. , 2000./) ! lower, starting and maximum values for the electric potential at all BoundaryType = (/2,2/) BCs
CoupledPowerTarget = 1e-10 ! target power of 1e-10 Watt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
DEFVAR=(INT): iz = 1 ! no. of nFineHexa
DEFVAR=(REAL): li = 1 ! length
DEFVAR=(REAL): lx = 1 ! length
!=============================================================================== !
! OUTPUT
!=============================================================================== !
ProjectName = parallel_plates_BCType60_AC ! name of the project (used for filenames)
Debugvisu = T ! Write debug mesh to tecplot file
Logging = F ! Write log files

!=============================================================================== !
! MESH
!=============================================================================== !
Mode =1 ! 1 Cartesian 2 gambit file 3 CGNS
nZones =1 ! number of zones
Corner =(/0.,0.,0.0,,li,0.,0.0,,li,lx,0.0,,0.,lx,0.0 ,,0.,0.,lx,,li,0.,lx,,li,lx,lx,,0.,lx,lx/) ! [-3,3]x[-3,3]x[-3,3]
nElems =(/5,1,1/) ! Anzahl der Elemente in jede Richtung
BCIndex =(/1,3,6,4,5,2/) ! Indices of Boundary Conditions for six Boundary Faces (z-,y-,x+,y+,x-,z+)
elemtype =108 ! Elementform (108: Hexaeder)
useCurveds =F ! T if curved boundaries defined
SpaceQuandt =1. ! characteristic length of the mesh
ConformConnect=T

!=============================================================================== !
! BOUNDARY CONDITIONS
!=============================================================================== !
nUserDefinedBoundaries=6

BoundaryName=BC_periodicz- ! BC index 1 (from position in parameterfile)
BoundaryType=(/1,0,0,1/) ! (/ Type, curveIndex, State, alpha /)
BoundaryName=BC_periodicz+ ! BC index 2
BoundaryType=(/1,0,0,-1/) ! here the direction of the vector 1 is changed, because it is the opposite side
vv=(/0.,0.,lx/) ! vector for periodic BC in z direction (zminus,zplus), index=1

BoundaryName=BC_periodicy- ! BC index 3
BoundaryType=(/1,0,0,2/)
BoundaryName=BC_periodicy+ ! BC index 4
BoundaryType=(/1,0,0,-2/) ! (/ BCType=1: periodic, 0, 0, Index of second vector vv in parameter file /)
vv=(/0.,lx,0./) ! vector for periodic BC in y direction (yminus,yplus), index=2


BoundaryName=BC_left
BoundaryType=(/4,0,0,0/) ! ideal conductor
BoundaryName=BC_right
BoundaryType=(/2,0,2,0/) ! ideal conductor
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
DEFVAR=(INT): iz = 1 ! no. of nFineHexa
DEFVAR=(REAL): li = 1 ! length
DEFVAR=(REAL): lx = 1 ! length
!=============================================================================== !
! OUTPUT
!=============================================================================== !
ProjectName = parallel_plates_BCType2_DC ! name of the project (used for filenames)
Debugvisu = T ! Write debug mesh to tecplot file
Logging = F ! Write log files

!=============================================================================== !
! MESH
!=============================================================================== !
Mode =1 ! 1 Cartesian 2 gambit file 3 CGNS
nZones =1 ! number of zones
Corner =(/0.,0.,0.0,,li,0.,0.0,,li,lx,0.0,,0.,lx,0.0 ,,0.,0.,lx,,li,0.,lx,,li,lx,lx,,0.,lx,lx/) ! [-3,3]x[-3,3]x[-3,3]
nElems =(/5,1,1/) ! Anzahl der Elemente in jede Richtung
BCIndex =(/1,3,6,4,5,2/) ! Indices of Boundary Conditions for six Boundary Faces (z-,y-,x+,y+,x-,z+)
elemtype =108 ! Elementform (108: Hexaeder)
useCurveds =F ! T if curved boundaries defined
SpaceQuandt =1. ! characteristic length of the mesh
ConformConnect=T

!=============================================================================== !
! BOUNDARY CONDITIONS
!=============================================================================== !
nUserDefinedBoundaries=6

BoundaryName=BC_periodicz- ! BC index 1 (from position in parameterfile)
BoundaryType=(/1,0,0,1/) ! (/ Type, curveIndex, State, alpha /)
BoundaryName=BC_periodicz+ ! BC index 2
BoundaryType=(/1,0,0,-1/) ! here the direction of the vector 1 is changed, because it is the opposite side
vv=(/0.,0.,lx/) ! vector for periodic BC in z direction (zminus,zplus), index=1

BoundaryName=BC_periodicy- ! BC index 3
BoundaryType=(/1,0,0,2/)
BoundaryName=BC_periodicy+ ! BC index 4
BoundaryType=(/1,0,0,-2/) ! (/ BCType=1: periodic, 0, 0, Index of second vector vv in parameter file /)
vv=(/0.,lx,0./) ! vector for periodic BC in y direction (yminus,yplus), index=2


BoundaryName=BC_left
BoundaryType=(/4,0,0,0/) ! ideal conductor
BoundaryName=BC_right
BoundaryType=(/60,0,1,0/) ! ideal conductor
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
CoupledPowerTarget = 1e-10 ! target power of 1e-10 Watt
CoupledPowerRelaxFac = 0.5 ! Relaxation factor: Adjust the potential slowly to avoid oscillations

* the second test utilizes the AC boundary, but with f=0 (hence resulting in a DC potential) to test if the AC boundary fallback works

BoundaryName = BC_right ! Adjust the right BC automatically depending on the actually input power
BoundaryType = (/60,1/) ! 1: RefState

* adjusting an actual AC boundary with a single particle does not work!

* Coupled Power output and adjusted electric potential are compared with reference solution
* parameter.ini for activating coupled Power output

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
! compare the last row in PartAnalyze.csv with a reference file
compare_data_file_name = PartAnalyze.csv
compare_data_file_reference = PartAnalyze_ref.csv
compare_data_file_tolerance = 20.0e-2
compare_data_file_tolerance_type = relative
compare_data_file_max_differences = 2
!compare_data_file_name = PartAnalyze.csv
!compare_data_file_reference = PartAnalyze_ref.csv
!compare_data_file_tolerance = 20.0e-2
!compare_data_file_tolerance_type = relative
!compare_data_file_max_differences = 2

! integrate columns x:y in a data file as integral(y(x), x, x(1), x(end))
integrate_line_file = SurfaceAnalyze.csv ! data file name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
! --- Externals Tool Reggie
MPI = 1 , 1
externalbinary = ./hopr/build/bin/hopr , ./hopr/build/bin/hopr
externaldirectory = pre-hopr-DC , pre-hopr-AC
externalruntime = pre , pre
cmd_pre_execute = ln\s-s\s./pre-hopr-DC/turner2013_BCType50_DC_mesh.h5\s../. , ln\s-s\s./pre-hopr-AC/turner2013_BCType51_AC_mesh.h5\s../.
MPI = 1 , 1 , 1
externalbinary = ./hopr/build/bin/hopr , ./hopr/build/bin/hopr , ./hopr/build/bin/hopr
externaldirectory = pre-hopr-DC , pre-hopr-AC , pre-hopr-AC-52
externalruntime = pre , pre , pre
cmd_pre_execute = ln\s-s\s./pre-hopr-DC/turner2013_BCType50_DC_mesh.h5\s../. , ln\s-s\s./pre-hopr-AC/turner2013_BCType51_AC_mesh.h5\s../. , ln\s-s\s./pre-hopr-AC-52/turner2013_BCType52_AC_mesh.h5\s../.

nocrosscombination:MPI,externalbinary,externaldirectory,externalruntime,cmd_pre_execute
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NAnalyze = 10 ! Number of analyze points
! =============================================================================== !
! MESH
! =============================================================================== !
MeshFile = turner2013_BCType50_DC_mesh.h5, turner2013_BCType51_AC_mesh.h5
MeshFile = turner2013_BCType50_DC_mesh.h5, turner2013_BCType51_AC_mesh.h5, turner2013_BCType52_AC_mesh.h5
useCurveds = F
! =============================================================================== !
! OUTPUT / VISUALIZATION
Expand Down Expand Up @@ -44,6 +44,8 @@ Particles-DSMC-CalcQualityFactors = F ! piclas: Pmax/Pmean
CalcPointsPerDebyeLength = T
CalcPICCFLCondition = T
CalcMaxPartDisplacement = T

CalcCoupledPower = T
! =============================================================================== !
! CALCULATION
! =============================================================================== !
Expand All @@ -61,12 +63,22 @@ Analyze_dt = 5.0E-10
! =============================================================================== !
! This BC is defined in hopr.ini
!BoundaryName = BC_left
!BoundaryType = (/50,0/),(/51,0/) ! Dirichlet with 0V initial BC, either DC or AC
!BoundaryType = (/50,0/),(/51,1/),(/51,2/) ! Dirichlet with 0V initial BC, either 1.) DC or 2.) AC or 3.) AC+power control

! The refstate for the AC case must be defined here
!RefState = (/150.0 , 13.56E6 , -1.57079632679/) ! RefState Nbr 1: Voltage, Frequency and Phase shift
RefState = (/10.0 , 3e9 , -1.57079632679/) ! RefState Nbr 1: Voltage, Frequency and Phase shift

! Power control for AC, only required for BoundaryType = (/52,1/)
CoupledPowerPotential = (/1.0 , 2.0 , 20.0/) ! lower, starting and maximum values for the electric potential at all BoundaryType = (/2,2/) BCs
CoupledPowerTarget = 10e-6 ! target power of 1e-10 Watt
CoupledPowerRelaxFac = 0.01

CoupledPowerMode = 1,2,3
CoupledPowerFrequency = 3.333e9, 3.333e9,3.333e9

nocrosscombination:MeshFile,CoupledPowerMode,CoupledPowerFrequency

! Boundary Field Output: Write current voltage to FieldAnalyze.csv
CalcBoundaryFieldOutput = T
BFO-NFieldBoundaries = 1 ! Nbr of boundaries
Expand Down
Loading

0 comments on commit 9860da2

Please sign in to comment.