You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chain reactions at boundaries: In TMAP8, from what I have gathered so far, the chemical reactions are defined as BCs. However, I don’t see how to simulate chain reactions. For example, I could model 2T(s)+0(s)->T2O(s) using BinaryRecombinationBC, but is there a way for me to model the T2O(s) -> T2O(g) reaction as well on the same boundary?
Is there a bank of verification and validation cases already put together? I saw that Paul presented some verification cases for diffusion yesterday.
I am not sure I understand how to use ‘RequirePositiveNCP’. It seems like it is here to create an additional driving force to keep concentrations positive. However, it seems to act as one kernel for a given ‘variable’ and prevent the couple variable ‘v’ from getting negative by deriving coef * min(variable,v). I do not understand how this can prevent ‘v’ from getting negative. Do you have more documentation on this?
Contribute to the code: If I want to contribute to the code, is the process to create an issue and then a pull request related to this issue like with MOOSE and BISON?
nodalkernels: It is the first time that I see a nodalkernel (TrappingNodalKernel and ReleasingNodalKernel), and I was wondering how to use it. What is the advantage of using a nodal kernel rather than a regular kernel? For example, I was using the existing MOOSE kernal ADMatReaction instead of ReleasingNodalKernel, and it seemed to work well. There probably are subtleties I am not aware of.
Use of AD: Do we want to promote the use of Automatic Differentiation in TMAP8 like is being done in MOOSE right now? I noticed that the TMAP8 kernels are not fully using AD. Is there a reason for it?
Kernels with Lagrange multiplier: I noticed that several kernels in TMAP8 were similar to the ones in MOOSE but used a Lagrange multiplier (example: LMDiffusion). I am not familiar with LM. What is the advantage of using these?
We can perhaps come up with a better system in the future but right now you would do a simple superposition of boundary conditions. E.g. if you have recombination consuming a variable u, then you have a UnaryRecombinationBC or a BinaryRecombinationBC. If you also have something dissociating to create u, then you also have a DissociationFluxBC on the same boundary. The residuals of these “integrated” boundary conditions sum. Basically you could model every individual surface reaction with an individual boundary condition and everything should turn out ok. From an input file writing standpoint this will probably become inconvenient for large systems of reactions … so we may have to think about an action system. Does this answer your question?
For the current cases taken from the previous TMAP’s user manual, check the “test/tests” directory. Note that these do not cover all that is in that manual – we want to work towards replacing all outlined functionality there.
This is a Nonlinear Complimentarity Problem (NCP). min(u, v) is one example of a NCP function. It implements the conditions:
u >= 0
v >= 0
u * v = 0
In our implementation u (the nonlinear variable) is a Lagrange Multiplier and v is the coupled variable we are trying to ensure remains positive. min(u, v) will enforce that by the end of your nonlinear solve either u or v will be zero, and its counterpart will be >= 0. If v is tending towards 0, then the LM u will be whatever value is necessary such that v does not go below 0. You can think of it as a source that ramps up to whatever value necessary to ensure positivity of v. This “source” comes in through the CoupledForce kernel. The best example of this is the interpolated-ncp-lm.i input.
Anyway it is somewhat involved math and it requires a somewhat involved setup. An alternative solution is probably just to take smaller timesteps such that you avoid undershoots and overshoots in your solve such that all concentrations stay in the positive, physical region. That may be the one we focus on in the future.
Yes, since TMAP8 will be following the same SQA standards as MOOSE and BISON, a PR tied to an Issue will be a requirement for code contribution.
I think nodal kernels make better sense when you have a nonlinear variable whose associated equation has no spatial derivatives, e.g. if the variable is not “mobile”. When you use regular kernels you are essentially forcing a spatial interpolation on this non-mobile species when it is not necessary. You can see this comment: NodalKernel moose#3029 (comment) for a justification. You can also explore that whole issue to get some more background on NodalKernels.
I think we should focus on AD for now. It will make our development faster. If later we decide we want hand-coded Jacobians for run-time speed then we can go back and add them … but since we’re mostly just solving 1D problems hopefully AD will be fast enough for our users.
So I talked about RequirePositiveNCP. I have to be honest and say that I don’t remember what I was going with the LMDiffusion and CoupledForceLM kernels 😊 I think what this probably is is the addition of what we call PSPG stabilization in Navier-Stokes. We essentially add the strong form of the primal equation multiplied by the LM test function to the LM residual. As the primal equation is solved then it’s residual will go to zero and it’s contribution to the LM residual will to zero so it’s what we call a “consistent” stabilization. But the effect of this is to add back diagonal dependence in the LM equation when the positivity constraint is active (e.g. when the LM is non-zero, e.g. min(LM, primal) = primal … you can see then that the LM residual no longer depends on itself if that is the only kernel we have). Adding these diagonals back makes the system more stable and allows use of a broader set of preconditioners.
But again this is pretty complex. I think we should not focus on the LM objects and just take smaller time-steps when we are worried about ensuring positivity.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Beta Was this translation helpful? Give feedback.
All reactions