Prerequisites of Learning Zapdos

27 views
Skip to first unread message

Malik Tahiyat

unread,
Apr 10, 2020, 5:22:32 PM4/10/20
to zapdos-users
Dear Members,

I would like to have a detailed list of prerequisites for starting to learn ZAPDOS for beginners. 

I know Linux, C++ and FEM are very essentials. Some relevant book chapters or a series of video lectures would be very helpful

On one of the Moose workshops, I was told that For FEM: this series of Youtube lectures (FEM, UMichigan) is very helpful: https://www.youtube.com/watch?v=U65GK1vVw4o&list=PLJhG_d-Sp_JHKVRhfTgDqbic_4MHpltXZ

It would be very helpful if someone could tell me how many lectures in this series do I need to study since this series has 165 lectures.

I would also like to know if there is any series of youtube lectures on C++ and how many of those shall I need to cover.

ANy help will be appreciated. 

THank you

Corey DeChant

unread,
Apr 10, 2020, 5:43:39 PM4/10/20
to zapdos-users
Good afternoon,

I reminder viewing some of those videos when I first started Zapdos. I skipped around the lectures for topics that were important to creating new kernels (i.e. transforming from strong to weak from and forming the the Jacobian). That series of videos also has lectures involving C++. Also, there is a Zapdos tutorial document in the Zapdos github (link: https://github.com/shannon-lab/zapdos/tree/devel/doc). The document talks about the basics of FEM, MOOSE objects, and the current capabilities of Zapdos.

Thank you,
Corey DeChant

Shane Keniley

unread,
Apr 10, 2020, 6:58:35 PM4/10/20
to zapdos-users
Malik,

It's good to hear from you! Hope you're doing well. 

This really depends on how deep you personally want to go. In order to be familiar with Zapdos, you really don't need to have an incredibly in-depth understanding of FEM or C++. (That said, it certainly doesn't hurt to know more!) At the very least you should learn the basics of the following: 

  1. How to turn an ODE/PDE into its weak form
  2. How to use .h and .C files
  3. Class inheritance 
  4. How to write down Jacobians
Once you know those three things, I would highly recommend the tutorial that Corey linked to.  It lists all of the equations that Zapdos solves. Alexander Lindsay's thesis is also in that directory, and Chapter 3 has a great description of the finite element method. I'd recommend converting the drift-diffusion equation into its weak form and then looking up the "ElectronTimeDerivative", "CoeffDiffusion", and "EFieldAdvection" kernels (in /zapdos/src/kernels/) to see how those terms are actually applied. (Keep in mind that Zapdos keeps the densities in logarithmic form, so that's why you'll see exponentials everywhere.)  You don't need to be a master C++ programmer to know how to use Moose; you just need to understand the formatting of Moose's class templates and you'll learn as you go. Moose handles all of the numerical algorithms so you don't need to worry about that to get started. 

As far as Moose and Zapdos go, there are a few things to keep in mind: 

  • nonlinear variables, material properties, and other terms that are spatially dependent are indexed by "_qp", which is the index of the quadrature point. It is essentially the spatial location of that term. 
  • In any kernel or boundary condition, you'll see a lot of variables that look like this: _u[_qp]     The variable _u always refers to the variable that the kernel/BC/etc. is acting on. 
  • Materials are used to store and calculate information that is necessary for your solve but isn't a nonlinear variable. For example, in Zapdos all the transport coefficients (mobility, diffusivity) for each species are stored as material properties. So are rate coefficients if you have any reactions. 
I find that the best way to learn how to use Moose and Zapdos is just to start using it. Don't get me wrong, those lecture videos are absolutely useful and I recommend watching them. Understanding how finite elements works will help you understand what Moose is doing in the background. But if your goal is to use Zapdos, it's best to just start using it. Most of the C++ you'll need to know can just be picked up by looking through all the other files in Moose and Zapdos. 

I personally didn't watch all of those videos or take a class on C++ to get started, so I can't say exactly how many lectures you should watch. 

Best,
Shane Keniley

Shane Keniley

unread,
Apr 10, 2020, 7:12:58 PM4/10/20
to zapdos-users
Forgot to mention: the tests directory (/zapdos/tests/) is mostly made up of actual physics examples. Look in 1d_dc/ for examples of running with a plasma-water interface (with a DC discharge), and Lymberopolous_rf_discharge has great examples of running with an RF discharge. Once you're familiar with the weak forms and how they're applied in the .C files, look through those input files. Each term in the [Kernel] block corresponds to a single term of a PDE. That's a great way to get started. 

Malik Tahiyat

unread,
Apr 10, 2020, 7:44:09 PM4/10/20
to zapdos...@googlegroups.com
Dear All,

Thank you so much for your replies. Much appreciated.

Is there any example or tutorial in Zapdos for  1 d and 2 d DC discharge in a low pressure gas? ( no liquid) 

--
You received this message because you are subscribed to a topic in the Google Groups "zapdos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zapdos-users/BZz1viki9WY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zapdos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zapdos-users/858d9099-5933-4829-b840-ea4b6216fa49%40googlegroups.com.

Alexander Lindsay

unread,
Apr 10, 2020, 8:10:02 PM4/10/20
to zapdos...@googlegroups.com


On Apr 10, 2020, at 3:58 PM, Shane Keniley <keni...@illinois.edu> wrote:


Malik,

It's good to hear from you! Hope you're doing well. 

This really depends on how deep you personally want to go. In order to be familiar with Zapdos, you really don't need to have an incredibly in-depth understanding of FEM or C++. (That said, it certainly doesn't hurt to know more!) At the very least you should learn the basics of the following: 

  1. How to turn an ODE/PDE into its weak form
  2. How to use .h and .C files
  3. Class inheritance 
  4. How to write down Jacobians
IMO we should not do 4) anymore with automatic differentiation. For real physics it takes too much time to derive the hand-coded Jacobian. And even if you spend that time it’s a coin flip whether your final result is bug free. 

Once you know those three things, I would highly recommend the tutorial that Corey linked to.  It lists all of the equations that Zapdos solves. Alexander Lindsay's thesis is also in that directory, and Chapter 3 has a great description of the finite element method. I'd recommend converting the drift-diffusion equation into its weak form and then looking up the "ElectronTimeDerivative", "CoeffDiffusion", and "EFieldAdvection" kernels (in /zapdos/src/kernels/) to see how those terms are actually applied. (Keep in mind that Zapdos keeps the densities in logarithmic form, so that's why you'll see exponentials everywhere.)  You don't need to be a master C++ programmer to know how to use Moose; you just need to understand the formatting of Moose's class templates and you'll learn as you go. Moose handles all of the numerical algorithms so you don't need to worry about that to get started. 

As far as Moose and Zapdos go, there are a few things to keep in mind: 

  • nonlinear variables, material properties, and other terms that are spatially dependent are indexed by "_qp", which is the index of the quadrature point. It is essentially the spatial location of that term. 
  • In any kernel or boundary condition, you'll see a lot of variables that look like this: _u[_qp]     The variable _u always refers to the variable that the kernel/BC/etc. is acting on. 
  • Materials are used to store and calculate information that is necessary for your solve but isn't a nonlinear variable. For example, in Zapdos all the transport coefficients (mobility, diffusivity) for each species are stored as material properties. So are rate coefficients if you have any reactions. 
I find that the best way to learn how to use Moose and Zapdos is just to start using it. Don't get me wrong, those lecture videos are absolutely useful and I recommend watching them. Understanding how finite elements works will help you understand what Moose is doing in the background. But if your goal is to use Zapdos, it's best to just start using it. Most of the C++ you'll need to know can just be picked up by looking through all the other files in Moose and Zapdos. 

I personally didn't watch all of those videos or take a class on C++ to get started, so I can't say exactly how many lectures you should watch. 

Best,
Shane Keniley


On Friday, April 10, 2020 at 4:22:32 PM UTC-5, Malik Tahiyat wrote:
Dear Members,

I would like to have a detailed list of prerequisites for starting to learn ZAPDOS for beginners. 

I know Linux, C++ and FEM are very essentials. Some relevant book chapters or a series of video lectures would be very helpful

On one of the Moose workshops, I was told that For FEM: this series of Youtube lectures (FEM, UMichigan) is very helpful: https://www.youtube.com/watch?v=U65GK1vVw4o&list=PLJhG_d-Sp_JHKVRhfTgDqbic_4MHpltXZ

It would be very helpful if someone could tell me how many lectures in this series do I need to study since this series has 165 lectures.

I would also like to know if there is any series of youtube lectures on C++ and how many of those shall I need to cover.

ANy help will be appreciated. 

THank you

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/zapdos-users/80498c97-eb27-4b2b-be46-947ebf3f3c8c%40googlegroups.com.

Steven Shannon

unread,
Apr 11, 2020, 10:19:17 AM4/11/20
to zapdos...@googlegroups.com
We’ve been thinking about a reboot of the zapdos training as well… it would be good to work some of this into that syllabus...

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 view this discussion on the web visit https://groups.google.com/d/msgid/zapdos-users/CAA_-CQapjkn2dv4G8nBE0bLkNzvWb7V5tsDaG97Cj8KsR9kCnA%40mail.gmail.com.

Malik Tahiyat

unread,
Apr 15, 2020, 7:17:02 PM4/15/20
to zapdos-users
HI Alex,

Since Zapdos uses LibMesh and PetSc, is it required to go over the separate tutorials of each of these?
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos...@googlegroups.com.

Alexander Lindsay

unread,
Apr 15, 2020, 7:51:50 PM4/15/20
to zapdos...@googlegroups.com
No I don't think so. At some point it will probably be good to have some familiarity with PETSc options because you can use those in your Zapdos/MOOSE input files. Otherwise you should hopefully never have any need to use libMesh/PETSc APIs since hopefully MOOSE has abstracted those away.

To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zapdos-users/a1ce5264-e18a-49da-99ee-c20b74fd0df6%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages