Input file generals Qs 1d_dc

31 views
Skip to first unread message

Mohamed Ezzat Mostafa

unread,
Apr 2, 2019, 6:05:21 AM4/2/19
to zapdos-users
Dear all--

I am interested to modify the BCs from Hagelaar to the classic one (Gamma.n=0) via choosing the reflection coefficient=1 where can I find this coefficient in the input file. 

Is there any stability condition for the code on the combination of (time step & the spatial step)? 

The dom0scale=10^-3 (the total gas domain is 1 mm, right?) then a ls=1/dom0scale=10^3  (the number of spatial steps, right?). In conclusion, the spatial step = 10^-6 = 1 micrometer (comes from the division of the domain 1mm by the steps number 10^3, looking for your comment if this correct otherwise please correct me. 
ls: is defined in Alex thesis on page 79 before table 3.1. 

Can I remove the liquid layer by choosing the dom1scale=0.0?

Best and thanks. 
Mohamed

Alexander Lindsay

unread,
Apr 2, 2019, 10:30:55 AM4/2/19
to zapdos...@googlegroups.com
On Tue, Apr 2, 2019 at 4:05 AM Mohamed Ezzat Mostafa <m.ezz...@gmail.com> wrote:
Dear all--

I am interested to modify the BCs from Hagelaar to the classic one (Gamma.n=0) via choosing the reflection coefficient=1 where can I find this coefficient in the input file. 

Are you only doing this at one of the boundaries? It seems like you would need leakage at at least one boundary in order to ever reach a steady-state. But anyways there is actually an even easier way to set a no flux boundary condition, and that is to specify no boundary conditions...this results in what we call the natural boundary condition which is Gamma.n=0.


Is there any stability condition for the code on the combination of (time step & the spatial step)? 

Typically a fine mesh is needed around the boundaries to resolve sharp gradients there


The dom0scale=10^-3 (the total gas domain is 1 mm, right?)

dom0scale specifies the **units** of the gas domain, so the gas domain is in units of milimeters. This works in synergy with how the mesh is created. You can look in the `liquidNew.geo` file to see this. The numbers in the geo file are the inverse of those in the input file. Looking at that mesh file you can see that at the left gas boundary I want my elements to have a characteristic size of of 2 nm...but since I actually want my gas mesh to be in units of mm, I scale this up by 1e3. In the middle of the gas domain I can have a coarser mesh, so at the .5 mm mark, I specify a chracteristic element size of 50 um. At the right boundary of the gas domain (1e-3 m or 1 mm) I again want a fine mesh, so I set a characteristic length of 1 nm. Note that all these numbers are scaled by the dom0mult parameter to convert from meters to milimeters (for the gas domain).

then a ls=1/dom0scale=10^3  (the number of spatial steps, right?).

It looks like I use the symbol l_c. As said in the thesis this is qual to 1 / positions_units or in the gas of the gas phase 1 / dom0Scale -> 1000. This means the spatial units are scaled by 1000 relative to SI units; so 1e-9 m will appear as 1e-6 (mm) in our simulation.

In conclusion, the spatial step = 10^-6 = 1 micrometer (comes from the division of the domain 1mm by the steps number 10^3, looking for your comment if this correct otherwise please correct me. 
ls: is defined in Alex thesis on page 79 before table 3.1. 

Can I remove the liquid layer by choosing the dom1scale=0.0?

I would remove the liquid layer by creating a new input file and removing all the objects that reference the liquid domain. You should also just run on a different mesh that doesn't include the liquid domain. Geometry.geo and Geometry.msh appear to correspond to a mesh that has no liquid layer.

Alex


Best and thanks. 
Mohamed

--
You received this message because you are subscribed to the Google Groups "zapdos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.
To post to this group, send email to zapdos...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zapdos-users/5c77cf17-546c-49d4-a272-6c6c2046093b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohamed Ezzat Mostafa

unread,
Apr 3, 2019, 6:19:26 AM4/3/19
to zapdos-users
Thanks-- 
Sorry for many questions but I searched a lot and no direct answer for the following two questions: 

1- What is the command to regenerate the .msh file from the .geo file after I update it. 
2- Which tool do you use to visualize the .msh file? I am using Paraview but doesn't work properly. 

Best (Mohamed)

On Tuesday, April 2, 2019 at 4:30:55 PM UTC+2, Alexander Lindsay wrote:
On Tue, Apr 2, 2019 at 4:05 AM Mohamed Ezzat Mostafa <m.ez...@gmail.com> wrote:
Dear all--

I am interested to modify the BCs from Hagelaar to the classic one (Gamma.n=0) via choosing the reflection coefficient=1 where can I find this coefficient in the input file. 

Are you only doing this at one of the boundaries? It seems like you would need leakage at at least one boundary in order to ever reach a steady-state. But anyways there is actually an even easier way to set a no flux boundary condition, and that is to specify no boundary conditions...this results in what we call the natural boundary condition which is Gamma.n=0.


Is there any stability condition for the code on the combination of (time step & the spatial step)? 

Typically a fine mesh is needed around the boundaries to resolve sharp gradients there


The dom0scale=10^-3 (the total gas domain is 1 mm, right?)

dom0scale specifies the **units** of the gas domain, so the gas domain is in units of milimeters. This works in synergy with how the mesh is created. You can look in the `liquidNew.geo` file to see this. The numbers in the geo file are the inverse of those in the input file. Looking at that mesh file you can see that at the left gas boundary I want my elements to have a characteristic size of of 2 nm...but since I actually want my gas mesh to be in units of mm, I scale this up by 1e3. In the middle of the gas domain I can have a coarser mesh, so at the .5 mm mark, I specify a chracteristic element size of 50 um. At the right boundary of the gas domain (1e-3 m or 1 mm) I again want a fine mesh, so I set a characteristic length of 1 nm. Note that all these numbers are scaled by the dom0mult parameter to convert from meters to milimeters (for the gas domain).

then a ls=1/dom0scale=10^3  (the number of spatial steps, right?).

It looks like I use the symbol l_c. As said in the thesis this is qual to 1 / positions_units or in the gas of the gas phase 1 / dom0Scale -> 1000. This means the spatial units are scaled by 1000 relative to SI units; so 1e-9 m will appear as 1e-6 (mm) in our simulation.

In conclusion, the spatial step = 10^-6 = 1 micrometer (comes from the division of the domain 1mm by the steps number 10^3, looking for your comment if this correct otherwise please correct me. 
ls: is defined in Alex thesis on page 79 before table 3.1. 

Can I remove the liquid layer by choosing the dom1scale=0.0?

I would remove the liquid layer by creating a new input file and removing all the objects that reference the liquid domain. You should also just run on a different mesh that doesn't include the liquid domain. Geometry.geo and Geometry.msh appear to correspond to a mesh that has no liquid layer.

Alex


Best and thanks. 
Mohamed

--
You received this message because you are subscribed to the Google Groups "zapdos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos...@googlegroups.com.

Alexander Lindsay

unread,
Apr 3, 2019, 11:03:31 AM4/3/19
to zapdos...@googlegroups.com
On Wed, Apr 3, 2019 at 4:19 AM Mohamed Ezzat Mostafa <m.ezz...@gmail.com> wrote:
Thanks-- 
Sorry for many questions

No worries

but I searched a lot and no direct answer for the following two questions: 

1- What is the command to regenerate the .msh file from the .geo file after I update it. 

You need the gmsh program. If you are on Ubuntu, it appears you can install it by simply running `sudo apt install gmsh`. For other OS's you can download by going here: http://gmsh.info/#Download.

Once you have the gmsh binary, you can create the .msh file by running `gmsh -1 Geometry.geo`.

2- Which tool do you use to visualize the .msh file? I am using Paraview but doesn't work properly. 

You can visualize the mesh with the gmsh binary, for instance `gmsh Geometry.msh` should open a window that shows the mesh (as long as the binary downloaded provides graphical support...I almost always build gmsh from source so I don't know the answer to this).

You can also generate a corresponding exodus mesh by running a MOOSE input file with `zapdos-opt -i input_file.i --mesh-only`. This you can visualize with Paraview.

Alex

To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.

To post to this group, send email to zapdos...@googlegroups.com.

Casey Icenhour

unread,
Apr 3, 2019, 11:08:06 AM4/3/19
to zapdos...@googlegroups.com
FYI All gmsh binaries downloaded from the website should have full graphical support. I can't speak to the most up-to-date Ubuntu package, but I remember it having that support as of 16.04 LTS. 

Mohamed Ezzat Mostafa

unread,
Apr 5, 2019, 7:15:11 AM4/5/19
to zapdos-users
Thanks, Alex and Casey--

I am changing the applied voltage but the solution doesn't converge, could you please comment my questions below and let me know if I am changing the right parameters in the input file.

[GlobalParams]
  offset = 20 I changed the offset to 50 Kv because I changed the potential from -1.25 and 1.25 to -10.0 Kv and 10.0 Kv. Could you please explain what do you means by the offset potential physically in the code? 

  # offset = 0

  potential_units = kV

  use_moles = true

  # potential_units = V

[]


the blue numbers 1.25 that I am changing to increase the applied voltage in the discharge to 10 KV. 

Is it true? what is the variable x? and where can we change it?

[Functions]

  [./potential_bc_func]

    type = ParsedFunction

    # value = '1.25*tanh(1e6*t)'

    value = 1.25

  [../]

  [./potential_ic_func]

    type = ParsedFunction

    value = '-1.25 * (1.0001e-3 - x)'

  [../]

[]


General question, do you have any numerical stability conditions on the spatial, temporal characteristic steps and the applied voltage?


Best and thanks
Mohamed
---------------------------------------------------------

On Wednesday, April 3, 2019 at 5:08:06 PM UTC+2, Casey Icenhour wrote:
FYI All gmsh binaries downloaded from the website should have full graphical support. I can't speak to the most up-to-date Ubuntu package, but I remember it having that support as of 16.04 LTS. 

On Wed, Apr 3, 2019 at 9:03 AM Alexander Lindsay <alexlin...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "zapdos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos...@googlegroups.com.
To post to this group, send email to zapdos...@googlegroups.com.

Alexander Lindsay

unread,
Apr 17, 2019, 10:57:41 AM4/17/19
to zapdos...@googlegroups.com
On Fri, Apr 5, 2019 at 5:15 AM Mohamed Ezzat Mostafa <m.ezz...@gmail.com> wrote:
Thanks, Alex and Casey--

I am changing the applied voltage but the solution doesn't converge, could you please comment my questions below and let me know if I am changing the right parameters in the input file.

[GlobalParams]
  offset = 20 I changed the offset to 50 Kv because I changed the potential from -1.25 and 1.25 to -10.0 Kv and 10.0 Kv. Could you please explain what do you means by the offset potential physically in the code? 


This parameter really has no association with the applied potential. It's used to help stabilize the simulation by artificially producing electrons/ions when their concentration gets low. You can look the the `LogStabilizationMoles` kernel to see its effect. The larger this number the less effect it will exert on the simulation. The lower it is the more stabilization you will have, but you don't want it to be too low or else it will have a non-negligible impact on a steady-state solution.

  # offset = 0

  potential_units = kV

  use_moles = true

  # potential_units = V

[]


the blue numbers 1.25 that I am changing to increase the applied voltage in the discharge to 10 KV. 

Is it true? what is the variable x? and where can we change it?

Changing the blue number from 1.25 to 10 indeed increases the applied potential from 1.25 to 10 kV.

x is the physical x coordinate. It's a variable that varies within the bounds of your mesh. You don't have any control over it outside of the bounds you set on it with your mesh.

[Functions]

  [./potential_bc_func]

    type = ParsedFunction

    # value = '1.25*tanh(1e6*t)'

    value = 1.25

  [../]

  [./potential_ic_func]

    type = ParsedFunction

    value = '-1.25 * (1.0001e-3 - x)'

  [../]

[]


General question, do you have any numerical stability conditions on the spatial, temporal characteristic steps and the applied voltage?

Well you can use the mesh size, applied potential, mobility, and diffusivity of each charged species to calculate individual Peclet numbers. In general the lower these numbers are the more stable your simulation will be, so you can:

- decrease applied potential
- decrease the mesh size

in order to reduce the possibility of field oscillations arising from dominance of advection over diffusion.

These plasma problems are highly non-linear so there is definitely a limit on the time step you can take.

Alex

To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.

To post to this group, send email to zapdos...@googlegroups.com.

Mohamed Ezzat Mostafa

unread,
May 21, 2019, 8:33:53 AM5/21/19
to zapdos-users
Dear all, 

I am simulating a microplasma formation under 1 atm gas (I used Ar) and high voltage of roughly 100 kV, so I am updating the 1d_dc example in Zapdos. 
I have done the following actions; 
1- Removed the liquid block. 
2- Created the mesh via the attached geometry file.
3- The BCs to have two electrodes one grounded to zero and the other to 5 kV up to 100 kV. 

Would you please review the structure of the input file especially the BCs? 

I set the ICs to 0 at one electrode and change the positive electrode from 5 to 100 KV, once I reach 50 kV, the solution diverges. Hence I tried to (i) decrease the mesh space by two orders of magnitudes and (ii) decrease the dtmin up to 1e-18, but still divergence. 

Any recommendations will be appreciated. 

Sincerely
Mohamed


geometry.geo
mean_en.i

Alexander Lindsay

unread,
May 21, 2019, 11:12:08 AM5/21/19
to zapdos...@googlegroups.com
Try changing your preconditioning and executioner blocks to the following and see if it helps:

[Preconditioning]
  [./smp]
    type = SMP
    full = true
  [../]
[]

[Executioner]
  type = Transient
  end_time = 1e-8
  petsc_options = '-snes_converged_reason -snes_linesearch_monitor'
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-4
  nl_abs_tol = 7.6e-5
  dtmin = 1e-18
  l_max_its = 40
  line_search = none

  [./TimeStepper]
    type = IterationAdaptiveDT
    cutback_factor = 0.6
    dt = 1e-11
    growth_factor = 1.2
   optimal_iterations = 15
  [../]
[]

It is not surprising to me that convergence gets worse as you increase that delta in potential. The more you increase that delta_V, the more advection dominated your problem becomes, and the more hyperbolic your PDE becomes. Hyperbolic PDEs are notoriously difficult to solve. Have you tried looking at your solution? When does your solve fail to converge? Is it the initial time step or later in your simulation?

--
You received this message because you are subscribed to the Google Groups "zapdos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.
To post to this group, send email to zapdos...@googlegroups.com.

Mohamed Ezzat Mostafa

unread,
May 27, 2019, 5:31:31 AM5/27/19
to zapdos-users
Thank you Alexander--

It converges from the first time step. 

this is my geo file: 

om0Mult = 1e3;

Point(1) = {0                , 0, 0, 50e-12 * dom0Mult};

Point(2) = {0.5e-3 * dom0Mult, 0, 0, 50e-8 * dom0Mult};

Point(3) = {1.0e-3 * dom0Mult, 0, 0, 50e-12 * dom0Mult};

Line(1) = {1,2};

Line(2) = {2,3};

Physical Line(0) = {1,2};


The blue one has reached to 10e-11 but doesn't help, do you recommend any solution for this hyperbolic dominate regime by using different lib or solving method from MOOSE. 
By the way, it works up to 30 kV and the failure comes in place from 40 kV and here is a block from the failure report: 

21 Nonlinear |R| = 1.752436e+05

    |residual|_2 of individual variables:

                  potential: 103.804

                  em:        281.267

                  Arp:       1.26792

                  mean_en:   175243


      0 Linear |R| = 1.752436e+05

      1 Linear |R| = 3.384659e+01

      2 Linear |R| = 4.949658e-01

      Line search: Scaling step by 1.761062334955e-03 old ynorm 5.678390708559e+10

      Line search: objective function at lambdas = 1. is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.5 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.25 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.125 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.0625 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.03125 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.015625 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.0078125 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.00390625 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.00195312 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.000976562 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.000488281 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.000244141 is Inf or Nan, cutting lambda

      Line search: objective function at lambdas = 0.00012207 is Inf or Nan, cutting lambda



Best
Mohamed 
On Tue, May 21, 2019 at 6:33 AM Mohamed Ezzat Mostafa <m.ez...@gmail.com> wrote:
Dear all, 

I am simulating a microplasma formation under 1 atm gas (I used Ar) and high voltage of roughly 100 kV, so I am updating the 1d_dc example in Zapdos. 
I have done the following actions; 
1- Removed the liquid block. 
2- Created the mesh via the attached geometry file.
3- The BCs to have two electrodes one grounded to zero and the other to 5 kV up to 100 kV. 

Would you please review the structure of the input file especially the BCs? 

I set the ICs to 0 at one electrode and change the positive electrode from 5 to 100 KV, once I reach 50 kV, the solution diverges. Hence I tried to (i) decrease the mesh space by two orders of magnitudes and (ii) decrease the dtmin up to 1e-18, but still divergence. 

Any recommendations will be appreciated. 

Sincerely
Mohamed


--
You received this message because you are subscribed to the Google Groups "zapdos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos...@googlegroups.com.

Alexander Lindsay

unread,
May 27, 2019, 5:41:18 PM5/27/19
to zapdos...@googlegroups.com
Did you try with Preconditioning and Executioner blocks that I specified? It doesn't look like you did because you are still using a line search.

To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.

To post to this group, send email to zapdos...@googlegroups.com.

Alexander Lindsay

unread,
May 28, 2019, 11:56:05 AM5/28/19
to zapdos...@googlegroups.com
Something else I might recommend:

If you are able to get convergence for a lower applied potential, then what you might do for higher potentials is to ramp up the value at the boundary over time, e.g. maybe start at a potential that you know you can get convergence for at t = 0 and then slowly ramp that potential value up over time using a FunctionDirichletBC object. Doing this you could hopefully develop a space charge that helps screen the potential so that the effects of the higher potential can be damped out. In general if a problem is highly non-linear, using relaxation techniques like this can be helpful.

Alex
Reply all
Reply to author
Forward
0 new messages