Replies: 1 comment
-
Why are you trying to compute these heat fluxes? Just for plotting/postprocessing? The fluxes you compute in this manner would be inconsistent with the fluxes that are actually used by the solver (computed here using stencils described in the Documentation). Depending on your needs, your easiest bet might be to hack into the code immediately after the fluxes are computed by the solver and print/save them then. If you do want to compute these fluxes in Derive.cpp so you can save them in a plt file, you may run into some headaches because the interface for the Derive functions is set within AMReX. If you define the derive function as part of the PeleC class (as is done here), you could potentially access the necessary sparse EB data structures to use the same flux function as the solver, linked above. Alternatively, there are other derive functions that are able to access information on the EB cell type, you might be able to use a similar approach to access the EB data you need, but you'd probably have to dig through AMReX docs to find if/how this can be done. |
Beta Was this translation helpful? Give feedback.
-
Hello, I am trying to compute the heat flux normal to an EB surface by writing a function in Derive.cpp. To do this, I want to access the cut cell centroid locations within Derive.cpp for computing the temperature gradient at the EB. Using this information, I can use the distance between the cut cell centroid and the EB along with the temperature difference between the cut cell and the wall to calculate the temperature gradient. I can then compute the conductivity within Derive.cpp to obtain the heat flux.
However, I am finding that obtaining the cut cell centroid data is only possible with a MultiFab input. In all the Derive.cpp functions, MultiFabs are not used as inputs. So, it currently seems that I am unable to compute this "EB-aware" gradient within Derive.cpp, unless there is something I missed. I am wondering whether there is any way around this issue or if I should be performing this computation in a different location? Any assistance would be greatly appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions