|
[Sponsors] |
New volScalarField incorrect values with dynamicRefineFvMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 8, 2022, 11:16 |
New volScalarField incorrect values with dynamicRefineFvMesh
|
#1 |
New Member
Joshua Christopher
Join Date: Jul 2022
Posts: 7
Rep Power: 4 |
Hello,
I am updating an old third-party solver I found (https://github.com/iroghair/openFoamEHD) so it will work with OpenFOAM-v2206. This solver is derived from interFoam, and adds two new volScalarField (Ue and rhoE) with corresponding governing equations and a coupling to the momentum equations through the Maxwell stress tensor. To update to OpenFOAM-v2206, I copied interFoam from v2206 and modified the source code as the original reference does (with changes as needed for the newer version). I am validating the changes with the vertically stacked liquids case from Roghair et al. 2013 (page 3: https://ris.utwente.nl/ws/portalfile...l_draft_v1.pdf). In the attached figures I have alpha.jpg showing a close-up of the interface between the two fluids, and Ue at the same spatial location. When I enable dynamic mesh refinement with dynamicRefineFvMesh, and tag refinement with alpha, I get incorrect values of Ue (one of my custom volScalarField). Alpha and Ue at the interface with adaptive mesh refinement is shown in alpha_AMR.jpg and Ue_AMR.jpg. The Ue field is supposed to be more smooth, but in the dynamically refined cells you can see there is a jump in the solution value. The rhoE volScalarField looks fine, but it is uniform zero for this test so that being correct might just be coincidence. Does anyone know how to debug the cause of this? I have reduced to just one level of refinement and decreased the step size significantly, so I think the problems is a coding issue rather than a configuration issue. I attached my dynamicMeshDict as well, just in case its a configuration issue! I'm thinking there is a problem with interpolation from the coarse cells to the dynamic refinement cells, but I am brand new to OpenFOAM and don't really know where to start looking into this. Thank you so much for your help! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add the values of any volscalarfield variable in every timestep | Pratik_21 | OpenFOAM Running, Solving & CFD | 12 | December 24, 2020 16:57 |
Assign values in an array to each cell of volscalarfield | Yongqiang66 | OpenFOAM Programming & Development | 7 | June 7, 2020 10:19 |
Setting boundary values for a volScalarField | Bloerb | OpenFOAM Programming & Development | 0 | August 25, 2016 08:07 |
why fixedValue pressure makes neighbor cells incorrect values | immortality | OpenFOAM Running, Solving & CFD | 6 | July 1, 2013 12:41 |
Counting non-zero values in a volScalarField | javier_motta | OpenFOAM | 1 | May 29, 2013 11:30 |