Question about the AMR Functionality in Castro. #3026
-
Hello, I am encountering some issues while using the AMR functionality in the Castro software and would appreciate your help. First, I noticed that the default values for amr.refinement_indicators in the documentation are dens and temp. However, in the Castro input files, variables like denerr, dengrad, temperr, and tempgrad are commonly used. Could you please explain the differences between these variables? Additionally, I am having trouble understanding some of the variables under amr.refine., such as value_greater. Does it mean that AMR is applied when the physical quantity exceeds this value? Also, how are gradient and relative_gradient calculated? Do they represent the difference in physical quantities between adjacent grid points divided by the grid spacing? Thank you for your assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, I don't think that there are any default refinement indicators. In the docs: The gradient is computed simply the difference between two adjancent zones, without any dx normalization. The relative gradient divides the gradient by the cell value. The code for that is here: so relative gradient checks:
and if that is true, then it tags a cell for refinement. |
Beta Was this translation helpful? Give feedback.
Hi,
I don't think that there are any default refinement indicators. In the docs:
https://amrex-astro.github.io/Castro/docs/AMR.html#tagging-for-refinement
it shows using density and temperature as an example.
The gradient is computed simply the difference between two adjancent zones, without any dx normalization.
The relative gradient divides the gradient by the cell value. The code for that is here:
https://github.com/AMReX-Codes/amrex/blob/bd2d730d925bf2b3dc5911b821deb52501d30890/Src/AmrCore/AMReX_ErrorList.cpp#L395
so relative gradient checks:
and if that is true, then it tags a cell for refinement.