dynamic mesh refinement and rhoCentralFoam
I'm trying to implement dynamic mesh refinement in my modified rhoCentralFoam solver to refine my mesh around shocks that form in my simulation. I believe I have set up the code properly (I used the tutorial for dynamic mesh implementation for dieselFoam) but its crashing when I run it. I believe this is due to not specifying the proper fluxes in the dynamicFvMesh dictionary correctFluxes entry. I notice theres a couple threads around here floating around with people who have done exactly what I am attempting to do. Which fluxes are required? Looking at the way rhoCentralFoam solves, most of the fields except phi and rhoU are declared each time the loop runs at the start of the loop and shouldn't need to be corrected if I refine my mesh at the end of the loop. I could however be mistaken as to how the dynamic meshing works.
Edit: So it looks like rho as a refine variable is a bad idea, it keeps tagging every cell for refinement up until the max number of cells. This is obviously not true. The case I'm running should dynamically refine to under 400,000 cells (work in FLUENT for a very similar case has given me roughly that many) and refining based on rho has gotten as high as 3million cells. Starting with a mesh of ~130,000 cells and using p as a refine field solves to completion without refining a single cell. Anyone with some knowledge regarding dynamic meshing and rhoCentralFoam able to give some advice?
Edit2: I think I've figured out a bit of how the mesh dict works, at which point the above comments sound fairly silly. It only refines cells with the field value between the two values indicated in the dict. I thought it was a bit more clever than that and worked off the relative values between neighbouring cells or something of the sort. Which means I need to code something that will establish that and refine based off that. Again, advice from those who have done this in rhoCentralFoam to accurately resolve shocks would be appreciated.
did you make any progress with refinement around shocks?
It would be great if you could post the solver with a simple example (e.g. forward step).
|All times are GMT -4. The time now is 11:22.|