-
This is more of a question. I want to update the first two zones at the centre of my grid to simulate stellar winds that are injecting energy into the mesh. I'm also intending to define a user routine to calculate the position of the ionisation front. The problem is that I do not understand on which loop can I update the relevant parameters for my problem (e.g density, energy etc). Is it on Mesh::UserWorkInLoop or in MeshBlock::UserWorkInLoop? Thank you, -Rogelio. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For analysis, MeshBlock::UserWorkInLoop and Mesh::UserWorkInLoop are suitable, as they are called only once in a timestep. However, if you modify physical quantities within these functions, the results will be inconsistent. |
Beta Was this translation helpful? Give feedback.
For analysis, MeshBlock::UserWorkInLoop and Mesh::UserWorkInLoop are suitable, as they are called only once in a timestep. However, if you modify physical quantities within these functions, the results will be inconsistent.
Instead, you should use user-defined source function to update physical quantities. Please read here.
https://github.com/PrincetonUniversity/athena/wiki/Problem-Generators#user-defined-physical-source-term