How to use previous timestep variable (scalar) value in FunctorMaterial or Function for ScalarTransport source term? #30535
-
Check these boxes if you have followed the posting rules.
QuestionHi all, I’m working with the ScalarTransport module under NavierStokes to simulate radon transport using a passive scalar. I’d like to define a source term that depends on the previous timestep's value of the scalar variable (scalar) — specifically something like:
Where I'm currently specifying the source term via a GenericFunctorMaterial: Q: Is there a built-in way to access the previous timestep value of a variable (like scalar) in a a quick note: Thank you guys! Additional informationMesh size and type: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
|
Hello When using functors (when calling functor(space arg, state/ time arg), you can specify a state argument which can be:
So the answer is you can do it, but you need to create an auxkernel or functor material to do this. in a Parsed-something? or in an object? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @GiudGiud I dont want to crate a new thread, but I have a quick question if I do [ScalarTransport] with [NavierStokes/flow] porous_medium_treatment = true the scalar generated from the source term should be multiplied with porosity, right? but it doesn't that right now, it generate at source term regardless of porosity |
Beta Was this translation helpful? Give feedback.

Hi @GiudGiud,
I kinda gave up on this, but found a way to work around it: