Use of Passive Scalars with UserDefinedBoundaryConditions #681
Replies: 1 comment 5 replies
-
|
I am sorry but it is still the case. I wanted to do this is a general way (see #626) but I have been too busy to do it for myself. Physical boundary functions are a little bit tricky, because they are applied not only on MeshBlock data but also on what we call "coarse buffer". For AMR prolongation/restriction operations, the coarse buffer stores the MeshBlock data but with half resolution. And before the prolongation, the boundary function must be applied on this coarse buffer. The user-defined boundary function is designed so that it can be applied automatically and consistently while users do not have to be aware of it. This is also true for the passive scalar. So, if you want to access the passive scalars from the user-defined function, you need to identify if it is being applied on MeshBlock data or on a coarse buffer, if you use AMR. This can be done by checking the range of is,ie/js,je/ks,ke given as the parameters of the boundary function. So it is technically possible, but it is tedious and not elegant. I guess it won't interfere with other parts (e.g. time integrator) but I have not tried it by myself. If you are not using AMR, it is probably not too difficult and I hope it works for you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The wiki states that the current passive scalar implementation is incompatable with the use of
UserDefinedBoundaryCondition, with "plans to expand this feature soon" (see here).I just wanted to check to see if this entry is up to date, and if there were any plans to add this feature?
If not, is this something that could be solved in a somewhat hacky way, for instance:
rfield, it does have access to its relevant meshblock (aspmb) which in turn has access to thePassiveScalarsclass aspscalarsPassiveScalarsclass DOES have access torfor the primitive scalar propertiesAre there any obvious issues with exploiting this pointer chain to access and set the scalar properties with a
UserDefinedBoundaryCondition?Beta Was this translation helpful? Give feedback.
All reactions