General Qs on Zapdos 1d_dc example

29 views
Skip to first unread message

Mohamed Ezzat Mostafa

unread,
Jan 17, 2019, 6:46:47 AM1/17/19
to zapdos-users
Dear All-- 
I am pretty new with MOOSE and Zapdos. I am working on gas discharge between two identical electrodes (rectangular-plate) with voltage ~ few 100 kV. If someone can answer the following questions will be appreciated. 

1- How can I put the same BCs on left and right? 
2- Where can I change the ICs in the input file? 
3- How can I redefine the transport coefficients which is pre-calculated by other codes?

para.png


Casey Icenhour

unread,
Jan 17, 2019, 12:36:32 PM1/17/19
to zapdos...@googlegroups.com
Hello Mohamed,

1 - To put the same BC on the left and right, you could place two boundary conditions of the same type with the same parameters in your 'BCs' block in the input file and set the 'boundary' parameter for these to 'left' or 'right' for the appropriate side. For example:
  [BCs]
    [./left_dirichlet]
      type = DirichletBC
      value = 1.0
      variable = diffused
      boundary = left
    [../]
    [./right_dirichlet]
      type = DirichletBC
      value = 1.0
      variable = diffused
      boundary = right
    [../]
  [] 
This would apply two Dirichlet BCs setting the value of 'diffused' to 1.0 on the left and right boundaries. More general info on BCs can be found in the MOOSE Examples.
 
2 - Initial Conditions are generally placed within a variable declaration within the 'Variables' block. Your initial condition will have a name, a type, and parameters like other parts of the input file. For example:
  [Variables]
    [./diffused]
      order = FIRST
      family = LAGRANGE
      # Use the initial Condition block underneath the variable
      # for which we want to apply this initial condition
      [./InitialCondition]
        type = ConstantIC
        coefficient = 2.0
      [../]
    [../]
  []
The IC here sets 'diffused' to a value of 2.0 at the beginning of the simulation. See another general example on ICs in MOOSE Example 7.

3 - As far as I know, those coefficients are set in the Gas.C Materials file (in zapdos/src/materials/Gas.C). I am not too familiar with modifying this file myself, so hopefully another member of the user group can chime in. But taking a look at that file (and the text files for the definitions of the variables coefficients that sit in the same directory) should help get you started. 

Best,
Casey

--
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/e2acf029-3496-4f27-ba8f-77072d748d75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

csde...@ncsu.edu

unread,
Jan 17, 2019, 2:40:53 PM1/17/19
to zapdos-users
Good afternoon,

To modify the transport coefficients, all you have to do is replace the td_argon_mean_en.txt file with your own text file. Just keep in mind that by default Zapdos will read the text file as electron energy vs Townsend coefficients. If you want to change the coefficients to a consent value or have an equation define the coefficients, you would have to modify the Gas.C file itself, or if you have a lot of different reactions, you might want to think about coupling Zapdos with CRANE (a chemistry application for MOOSE). Please lets us know if you have any more questions.

Thank you,
Corey DeChant

Alexander Lindsay

unread,
Jan 17, 2019, 2:41:22 PM1/17/19
to zapdos...@googlegroups.com
Thanks for the detailed reply Casey. Note that you can cut down the number of sub-blocks for the BCs by writing this:
[BCs]
    [./dirichlet]
      type = DirichletBC
      value = 1.0
      variable = diffused
      boundary = 'left right'
    [../]
  []

Mohamed Ezzat Mostafa

unread,
Jan 28, 2019, 7:01:17 AM1/28/19
to zapdos-users
Thank you Corey--

What do you think about BOLSIG+ for calculating the transport coefficients? I am still not familiar with MOOSE, so I am not sure if the CRANE app is easy for me to learn to handle the problem or not?  

Best 
Mohamed

csde...@ncsu.edu

unread,
Jan 28, 2019, 11:59:17 AM1/28/19
to zapdos-users
Good afternoon,

Yes, you can use BOLSIG+ for the transport coefficients but just keep in mind a few things:
1. BOLSIG+ gives the mobility and diffusion coefficient as mu*N and D*N, so you will need to divided them by your gas density before inputting them into Zapdos.
2. BOLSIG+ only gives the Townsend ionization and attachment coefficient. BOLSIG+ does give all the rate coefficients you might need (elastic collision, ionization, and excitation), so you can use the formula alpha=k/(mu*(E/N)) to convert rate coefficients to Townsend coefficients.

I mentioned CRANE because I was unsure about which reactions you want to include. If you are only looking at elastic collisions, ionization and excitation, you should be fine. If you wanted to include more metastable reactions later, you might want to look at including CRANE.

Also, I saw your other post about BOLSIG+ and unfortunately I have only used it with Windows which has simplified user interface.

Thank you,
Corey DeChant

Plasma School (Plas-Blog)

unread,
Jan 28, 2019, 12:05:22 PM1/28/19
to zapdos...@googlegroups.com
Thank you Corey for this explanation, yes these reactions will be enough for the start until I adapt myself to solve the problem with Zapdos from A to Z.

Best
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.

Mohamed Ezzat Mostafa

unread,
Mar 26, 2019, 8:58:03 AM3/26/19
to zapdos-users
Dear all--

I am a bit confused about the time step in the input file at the 1d_dc example, could you please clarify my queries that appear in red below? 

[Executioner]

  type = Transient

  end_time = 1e-1 . #I consider it as the whole simulation time, is it correct?

  # end_time = 10

  petsc_options = '-snes_converged_reason -snes_linesearch_monitor'

  # petsc_options = '-snes_test_display'

  solve_type = NEWTON

  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type -snes_linesearch_minlambda'

  petsc_options_value = 'lu NONZERO 1.e-10 preonly 1e-3'

  # petsc_options_iname = '-pc_type -sub_pc_type'

  # petsc_options_value = 'asm lu'

  # petsc_options_iname = '-snes_type'

  # petsc_options_value = 'test'

 nl_rel_tol = 1e-4 #what does it represent?

 nl_abs_tol = 7.6e-5 #what does it represent?

  dtmin = 1e-12

  l_max_its = 20

  [./TimeStepper]

    type = IterationAdaptiveDT

    cutback_factor = 0.4

    dt = 1e-11   #I consider it as the time step, is it correct?

    # dt = 1.1

    growth_factor = 1.2

   optimal_iterations = 15

  [../]

[]

If I understand correctly, then I can choose any end time and time step freely or it has some conditions?

Because I tried to change the end_time: 10e-4 and dt= 10e-10 and it gives me this error 

Solve Did NOT Converge!

*** ERROR ***

Solve failed and timestep already at dtmin, cannot continue!

 after 39 time step with the following message at the first time step:

      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: gnorm after quadratic fit 8.856854256170e+10

      Line search: Quadratically determined step, lambda=3.9062500000000002e-04


Best

Mohamed

Alexander Lindsay

unread,
Mar 26, 2019, 11:16:54 AM3/26/19
to zapdos...@googlegroups.com
On Tue, Mar 26, 2019 at 6:58 AM Mohamed Ezzat Mostafa <m.ezz...@gmail.com> wrote:
Dear all--

I am a bit confused about the time step in the input file at the 1d_dc example, could you please clarify my queries that appear in red below? 

[Executioner]

  type = Transient

  end_time = 1e-1 . #I consider it as the whole simulation time, is it correct?

Yes

  # end_time = 10

  petsc_options = '-snes_converged_reason -snes_linesearch_monitor'

  # petsc_options = '-snes_test_display'

  solve_type = NEWTON

  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type -snes_linesearch_minlambda'

  petsc_options_value = 'lu NONZERO 1.e-10 preonly 1e-3'

  # petsc_options_iname = '-pc_type -sub_pc_type'

  # petsc_options_value = 'asm lu'

  # petsc_options_iname = '-snes_type'

  # petsc_options_value = 'test'

 nl_rel_tol = 1e-4 #what does it represent?

The solve will be considered converged if:

(nonlinear_residual / initial_non_linear_residual) < 1e-4

 nl_abs_tol = 7.6e-5 #what does it represent?

The solve will be considered converged if:

nonlinear_residual < 7.6e-5

  dtmin = 1e-12

  l_max_its = 20

  [./TimeStepper]

    type = IterationAdaptiveDT

    cutback_factor = 0.4

    dt = 1e-11   #I consider it as the time step, is it correct?

This is the size of the very first time step. The IterationAdaptiveDT time-stepper will increase or decrease this time step based on how many non-linear iterations it takes to reach convergence.

    # dt = 1.1

    growth_factor = 1.2

   optimal_iterations = 15

  [../]

[]

If I understand correctly, then I can choose any end time and time step freely or it has some conditions?

No conditions

Because I tried to change the end_time: 10e-4 and dt= 10e-10 and it gives me this error 

Solve Did NOT Converge!

*** ERROR ***

Solve failed and timestep already at dtmin, cannot continue!

 after 39 time step with the following message at the first time step:

      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: gnorm after quadratic fit 8.856854256170e+10

      Line search: Quadratically determined step, lambda=3.9062500000000002e-04

This means that the non-linear solver was unable to converge. This can be for many reasons. You can read the PETSc FAQ page here. You can also see the MOOSE documentation on troubleshooting failed solves here.

Alex


Best

Mohamed

On Monday, January 28, 2019 at 5:59:17 PM UTC+1, csde...@ncsu.edu wrote:
Good afternoon,

Yes, you can use BOLSIG+ for the transport coefficients but just keep in mind a few things:
1. BOLSIG+ gives the mobility and diffusion coefficient as mu*N and D*N, so you will need to divided them by your gas density before inputting them into Zapdos.
2. BOLSIG+ only gives the Townsend ionization and attachment coefficient. BOLSIG+ does give all the rate coefficients you might need (elastic collision, ionization, and excitation), so you can use the formula alpha=k/(mu*(E/N)) to convert rate coefficients to Townsend coefficients.

I mentioned CRANE because I was unsure about which reactions you want to include. If you are only looking at elastic collisions, ionization and excitation, you should be fine. If you wanted to include more metastable reactions later, you might want to look at including CRANE.

Also, I saw your other post about BOLSIG+ and unfortunately I have only used it with Windows which has simplified user interface.

Thank you,
Corey DeChant

--
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,
Mar 27, 2019, 6:39:33 AM3/27/19
to zapdos-users
Thanks Alex--

Does the electron-temperature shown in the below plot is given in eV unit?

e-temp.png


Alexander Lindsay

unread,
Mar 27, 2019, 6:24:41 PM3/27/19
to zapdos...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages