PICSolver Object
The PICSolver object defines all the settings that control the simulations with the Particle-in-cell (PIC) solver.
General
PIC Solver Settings
FrequencyRange ( double fmin, double fmax )
Sets the frequency range for the simulation. Changing the frequency range has several side effects. The mesh will be changed and all previous simulation results will be deleted. However, before the frequency range is actually changed, a dialog window will appear that asks to save the old results to another file.
PBAFillLimit ( double percentage )
Defines when a cell should be treated as entirely filled with Perfectly Conducting Material (PEC). So if a cell is filled with more than percentage of the cell with PEC, the entire Cell will be filled with PEC. For other materials this setting has no effect. Generally, this setting should not be changed.
AlwaysExludePec ( bool flag )
This method offers the possibility to automatically exclude all PEC regions from the calculation. In case that large PEC regions exist this option may produce a significant speed-up of the simulation.
GetFmin double
Returns the minimum defined frequency.
GetFmax double
Returns the maximum defined frequency.
GetNumberOfPorts int
Returns the number of defined Ports.
ArePortsSubsequentlyNamed bool
Inquires whether the ports are consecutively numbered or not. If they are, the total number of ports equals to the last port name. Otherwise the last name might be higher.
GetStimulationPort int
Returns -1, if ports = All, 0 if ports = Selected Ports and -2, if plane wave excitation is active.
GetStimulationMode int
Returns 0, if stimulation port is not a wave guide port, returns -1, if modes = All and if there is a wave guide port.
PBAFillLimit (99)
Start int
Starts the PIC Simulation with the current settings and returns 1 if the calculation is successfully finished and 0 if it failed.
SimulationTime( double value )
Sets the total simulation time for the particle in cell simulation.
AvoidSpaceChargeAtPEC( bool flag )
If flag is true, possible non-physical space charge at PEC bodies due to emission and/or collision of particles is avoided.
ThermalCoupling( bool flag, bool bUseSimulationTime, double starttime, double endtime )
Calculates a time-averaged power due to particle collisions with solids and write the data to a file. The data can be used to drive a thermal calculation. One can select whether the simulation time or a user-defined interval should be used for the power averaging.
SheetTrans( bool bImport, double transparency )
Sets the sheet transparency for particles in percent. If the transparency equals 100%, all particles will move through the sheets. A transparency of 0% means that all particles will collide with the sheets. Is bImport true, the transparency is based on an import file and not on the fixed percentage value.
ParticleSolidInteraction( bool flag, int nSamples )
Enables or disables the calculation of the collision information during the solver run. If it is enabled, the maximum number of time points that is displayed is specified by nSamples.
MultipactingSolverStop( bool enable, double intervals, double width, double base )
If the multipacting detection is enabled, the mean values of the number of generated secondary particles will be compared each time step. The mean values are calculated in time intervals of width width. The solver will stop if the mean values increase exponentially. The base of the exponential growth is given by base.
MeshAdaption ( bool flag )
If MeshAdaption is enabled (flag = True) several Simulation runs are started to automatically find the optimum mesh for the given problem.
UseDistributedComputing ( bool flag )
If flag is set to True this method enables the distributed calculation of different solver runs across the network.
StoreTDResultsInCache ( bool flag )
If flag is set to True this method stores results of the time domain solver in the result cache.
FrequencySamples ( int nSamples )
Defines the resolution of all frequency domain signals for the next simulation. This setting has no significant influence on the total simulation time. It has only an effect on the Discrete Fourier Transform (DFT) that is used to transform the time domain signals into the frequency domain. nSamples will be the total number of frequency samples that the frequency domain signals will have.
TimeStepStabilityFactor ( double value )
Specifies a stability factor that is multiplied to the current valid time step. Note: Normally the current time step is matched to the stability limit, hence values greater than 1 may make the time domain simulation unstable.
SetPMLType ( enum key )
Define the PML formulation type. The algorithms that can be set are the Convolution PML, which is set using key = "ConvPML", or the Generalized PML theory, which is set using key = GTPML.
MatrixDump ( bool flag )
If flag = true, all solver relevant matrices are written into a file.
RestartAfterInstabilityAbort ( bool flag )
If flag = true, the transient solver is automatically restarted twice with a reduced time step after an instability abort. In case that the occurred instability is due to the time discretization, this process helps to provide a stable simulation during the restarted run.
HardwareAcceleration ( bool flag )
If flag = true, hardware acceleration for the pic solver is activated. Note that a hardware acceleration card must be installed in order to benefit from this setting.
SEEDeterministicRandom(bool flag)
Enables or disables a nondeterministic random number generation process for the secondary electron generation. The default setting is True and enables a deterministic random process.
MinimumEmission ( enum type, double current, double charge )
Set minimum emission settings for all PIC emission models and secondary emission. The argument type can be "Current" or "Charge". Current and charge must be set in absolute values.
PIC Solver Transient Excitation
CalculateModesOnly ( bool flag )
If flag is True, the solver calculates only the port modes.
StimulationMode ( enum / int key )
Selects the mode to be used for excitation.
The parameter key may have one of the following values:
All |
All modes will be excited once. |
int modeNumber |
The mode number to be used for excitation. |
StimulationPort ( enum / int key )
Selects the port(s) to be used for excitation.
The parameter key may have one of the following values:
All |
All ports will be excited once. |
Selected |
Only those ports / modes are used for excitation that have been set by ExcitationPortMode. |
"Plane Wave" |
A plane wave will be used for excitation. |
int portNumber |
The port number (port name) to be used for excitation. |
ResetExcitationModes
Resets the complete excitation list, which was previously defined by applying method ExcitationPortMode.
ExcitationPortMode ( int port, int mode, double ampli, double phase/time, name signal, bool flag )
Defines the excitation signal signal that is used to excite the port mode mode at the port port. The excitation signal must be defined previously. The signal curve is modified due to the defined ampli and phase/time values, describing the amplitude and the time shift of the excitation. The latter can be defined as a time shift or a phase shift, using the SetSimultaneousExcitationOffset method. The boolean argument flag activates the time shift definition.
Note: If signal = "default", the chosen reference signal is used for excitation. MWS offers an Excitation Signal Library where different time signals can be chosen from. Time signals other than "default" can be chosen only if SimultaneousExcitation is set to True.
PhaseRefFrequency ( double value )
The phase values defined in the excitation list are converted into corresponding time shifts for the time signals by use of this reference frequency. If the reference frequency is set to '0', time delay instead of phase shift is activated. (see ExcitationPortMode Method) )
SimultaneousExcitation ( bool flag )
Enables simultaneous excitation.
SetSimultaneousExcitAutoLabel ( bool flag )
If a set of excitations has been defined for simultaneous excitation, an automatically generated label (as a prefix) is used to name the signals produced by the simulation. Use this method to activate this automatic labeling.
SetSimultaneousExcitationLabel ( name label )
If the SetSimultaneousExcitAutoLabel method is disabled, it is possible to manually define a prefix name for the signals produced by simultaneous excitation run.
SetSimultaneousExcitationOffset ( enum key )
This method determines the time shift definition between different time signals applied for simultaneous excitation.
The parameter key may have one of the following values:
"Timedelay" |
The time delay defined with the ExcitationPortMode method is directly used to shift the signals in time. |
"Phaseshift" |
The phase shift defined with the ExcitationPortMode method is used to to calculate the time delay using the phase reference frequency (PhaseRefFrequency method). This delay value is then used to shift the signals in time. |
ConsiderEStaticField ( bool flag )
If flag is set to " true" an electrostatic field will be computed, which is considered for the particle simulation.
EStaticFactor( double value )
Sets the scaling factor of an electrostatic field for the particle simulation.
ConsiderMStaticField ( bool flag )
If flag is set to " true" a magnetostatic field will be computed, which is considered for the particle simulation.
MStaticFactor( double value )
Sets the scaling factor of a magnetostatic field for the particle simulation.
ConsiderPredefinedField ( bool flag )
If flag is set to " true", predefined fields are considered for the particle simulation.
PredefinedFactor( double value )
Sets the scaling factor of predefined fields for the particle simulation.
WaveguideBroadband ( bool flag )
Switches the broadband waveguide boundary condition (BBP) for inhomogeneous ports on/off.
SetBBPSamples ( int nSamples )
Sets the number of frequency points used for a broadband port (BBP). Broadband ports are used for ports at inhomogeneous waveguides. The more points are used, the more accurate the port operator will be. However the simulation time will increase as well, as all selected modes are simulated for every frequency point.
UseOpenBoundaryForHigherModes ( bool flag )
Determines whether unconsidered higher modes occurring at a waveguide port should be absorbed using a Mur open boundary (switch = True) or not (flag = False).
SetModeFreqFactor ( double value )
Specifies the frequency that is used for the waveguide port mode calculation. The factor is set relatively to the current frequency range. Therefore value may range between 0 and 1.
AdaptivePortMeshing ( bool flag )
Activates the adaptive port meshing feature to automatically calculate a more accurate line impedance and mode pattern. To this end, the port mode solver runs several passes while adaptively refining the port mesh.
AccuracyAdaptivePortMeshing ( int nPercent )
Represents an accuracy limit for the relative error of the line impedance. The adaptive port meshing stops when the line impedance has not changed more than nPercent for two following passes or when the maximum number of passes is reached.
PassesAdaptivePortMeshing ( int nPasses )
Restricts the number of passes in the adaptive port meshing if the port line impedance needs a long time to converge.
SurfaceImpedanceOrder ( int order )
Specifies the order of the one-dimensional surface impedance model. Higher model order leads to enhanced simulation results at the expense of a higher calculation effort.
TimestepReduction ( double factor )
Reduces the time step by the factor factor. Generally it should not be necessary to change this value. A value that is too large might cause instabilities in the simulation and a value that is too low unnecessarily increases the simulation time.
UseTSTAtPort ( bool flag )
Specifies if TST is used in the port region of a waveguide port (flag = True) or not (flag = False).
SetSubcycleState (enum {"Automatic", "Cycles", "NoCycles"} key )
Specifies if the use of subcycles is activated in the time step calculation. By setting "Cycles", the possibility to use subcycles is always considered, whereas by setting "NoCycles" the use of subcycles is never considered. By setting "Automatic" the use or not of subcycles is regulated internally.
NumberOfSubcycles ( int nCycles )
Specifies the number of extra time steps for cells with a very small local time step. Generally this value should not be changed.
SubcycleFillLimit ( double percentage )
Special setting for the PBA method. Generally this setting should not be changed.
SetSubgridCycleState (enum {"Automatic", "Cycles", "NoCycles"} key )
When the Multilevel Subgridding Scheme is activated, this command specifies if the use of subgrid specific cycling is considered in the time step calculation. When subgrid specific cycling is activated, the different grid levels are calculated with different time steps.
SimplifiedPBAMethod ( bool flag )
This method activates a simplified PBA formulation for the transient simulation without any timestep reduction or usage of subcycled updates. This advantage is gained by a slight loss of accuracy and decrease of convergence.
ExcitationSignalGauss ( name signalName, double fmin, double fmax )
Creates a new excitation signal with gaussian excitation function within the given frequency range. Please note that for proper broadband S-Parameter calculations the Gaussian pulse should always be used. To ensure accurate results the signal's frequency range must be consistent with the project's frequency range.
ExcitationSignalRect ( name signalName,
Creates a new excitation signal with rectangular excitation function. Please note that for proper broadband S-Parameter calculations the Gaussian pulse should always be used. To ensure accurate results the signal's timing settings must be consistent with the project's frequency range.
ExcitationSignalUser ( name signalName, double tTotal )
Creates a new excitation signal with a user-defined excitation function. A user-defined function can be created by writing a VBA-function with the name ExcitationFunction inside a file named Projectname^signal_name.usf for an arbitrary signal name or Projectname.usf for the reference signal name. This file has to be located in the same directory as the current project. Please note that for proper broadband S-Parameter calculations the Gaussian pulse should always be used. To ensure accurate results the signal's timing settings must be consistent with the project's frequency range.
ExcitationSignalAsReference ( name signalName )
Selects the given excitation signal signalName as default / reference signal.
ExcitationSignalRename ( name oldName, name newName )
Renames an existing excitation signal.
ExcitationSignalDelete ( name signalName )
Deletes an existing excitation signal.
ExcitationSignalResample ( name signalName,
double tstep )
Generates a signal file Projectname^signal_name.sig within the specified time interval [tmin, tmax], sampled with the timestep tstep.
SimulationTime (0.0)
ConsiderEStaticField (False)
EStaticFactor (1.0)
ConsiderMStaticField (False)
MStaticFactor (1.0)
ConsiderPredefinedBField (False)
PredefinedBFactor (1.0)
MeshAdaption (False)
UseDistributedComputing (False)
StoreTDResultsInCache (False)
TimeStepStabilityFactor (1.0)
CalculateModesOnly (False)
StimulationMode (1)
SetBBPSamples (5)
WaveguideBroadband (False)
UseOpenBoundaryForHigherModes (False)
SetModeFreqFactor (0.5)
AdaptivePortMeshing (True)
AccuracyAdaptivePortMeshing (1)
PassesAdaptivePortMeshing (3)
NumberOfPulseWidths (20)
SurfaceImpedanceOrder (10)
TimestepReduction (0.45)
SetSubcycleState ("Automatic")
NumberOfSubcycles (4)
SubcycleFillLimit (70)
SetSubgridCycleState ("Automatic")
SimplifiedPBAMethod (False)
SetSimultaneousExcitAutoLabel (True)
SetSimultaneousExcitationOffset ("Phaseshift")
AlwaysExludePec (False)
RestartAfterInstabilityAbort (True)
HardwareAcceleration (False)
SetPMLType ("ConvPML")
' PIC Solver simulation with a predefined B-Field
With PICSolver
.ConsiderEStaticField "False"
.EStaticFactor "1.0"
.ConsiderMStaticField "False"
.MStaticFactor "1.0"
.ConsiderPredefinedBField "True"
.PredefinedBFactor "1.5"
.StimulationPort "Selected"
.StimulationMode "All"
.SimulationTime "2"
.CalculateModesOnly "False"
.StoreTDResultsInCache "False"
.UseDistributedComputing "False"
End With