CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

continuity error occurs when combining dynamicRefineFvMesh and dynamicMotionSolverFvM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2018, 18:30
Default continuity error occurs when combining dynamicRefineFvMesh and dynamicMotionSolverFvM
  #1
New Member
 
SSSSS
Join Date: Jun 2011
Posts: 29
Rep Power: 15
doctorWho is on a distinguished road
I am trying to combine dynamicRefineFvMesh and dynamicMotionSolverFvMesh with solidBody motionFunction. the new class is based on the dynamicRefineFvMesh and just adding a motionSolver pointer as follows:

Code:
class dynamicMotionRefineFvMesh
:
    public dynamicFvMesh
{
protected:
        ...
        //- motion solver
        autoPtr<motionSolver> motionPtr_;
        ...
}
in the source file, the member function, update() has the following statements at the begining and the rest is the same as that of dynamicRefineFvMesh.

Code:
bool Foam::dynamicMotionRefineFvMesh::update()
{
    fvMesh::movePoints(motionPtr_->newPoints());
    if (foundObject<volVectorField>("U"))
    {
        lookupObjectRef<volVectorField>("U").correctBoundaryConditions();
    }
    ...
}
for a test case, I have copied sloshingTank3D6DoF case from the tutorial and modified const/dynamicMeshDict as follows:

Code:
dynamicFvMesh   dynamicMotionRefineFvMesh;
motionSolver    solidBody;
solidBodyMotionFunction tabulated6DoFMotion;
CofG            (0 0 0);
timeDataFileName "constant/6DoF.dat";
refineInterval  1;
field           alpha.water;
lowerRefineLevel 0.001;
upperRefineLevel 0.999;
unrefineLevel   10;
nBufferLayers   1;
maxRefinement   2;
maxCells        200000;
    correctFluxes
    (
     (phi none)
     (nHatf none)
     (rhoPhi none)
     (alphaPhi none)
     (alphaPhi10 none)
     (ghf none)
    );
dumpLevel       true;
I got the following error when interDyMFoam is run.

Code:
--> FOAM FATAL ERROR: 
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 1e-300
Specified mass inflow   : 3770.92
Specified mass outflow  : 3770.92
Adjustable mass outflow : 0
When I checked with original dynamicMotionSolverFvMesh with solidBody motionFunction, the adjustPhi function shows as follows:
Code:
Total flux              : 123172.
Specified mass inflow   : 389e-13
Specified mass outflow  : 389e-13
Adjustable mass outflow : 0
I guess dynamicRefineMesh modifies boundary field when refine/unrefine but have no clue how to correct this behavior yet. So any help will be helpful.
doctorWho is offline   Reply With Quote

Old   March 29, 2018, 12:20
Default
  #2
New Member
 
Fabian
Join Date: May 2017
Location: Dortmund
Posts: 2
Rep Power: 0
Fabian_tudo is on a distinguished road
Did you find a solution for this problem? I merged dynamicRefineFvMesh and dynamicMotionSolverFvMesh in a quite similar way which leads to the same error. I tried to solve it by adjusting the parameters of the PIMPLE algorithm (especially changing correctingPhi to "yes") which reduces the total Flux but not in a satisfactory way.

I am not sure if it has anything to do with the boundary field because even if my refinement should be performed in the middle of the domain the error occurs. If I choose settings so that no cells are refined the dynamic mesh works fine exactly like dynamicMotionSolverFvMesh.
Fabian_tudo is offline   Reply With Quote

Old   April 5, 2018, 05:42
Default Temporary solution found
  #3
New Member
 
Fabian
Join Date: May 2017
Location: Dortmund
Posts: 2
Rep Power: 0
Fabian_tudo is on a distinguished road
I overcame this error relatively simple by changing the correctPhi parameter in the PIMPLE subdictionary of fvSolution to no. Unfortunately I do not have results to check the effects until now because another error occurs which I plan to discuss in detail in a new thread.
Fabian_tudo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining mesh motion and refinement mturcios777 OpenFOAM Programming & Development 15 September 16, 2022 02:04
dynamicRefineFvMesh problem Petr Kazarin OpenFOAM Running, Solving & CFD 5 November 9, 2017 07:36
Does dynamicRefineFvMesh work with unstructured tetra meshes? giovanni.medici OpenFOAM Running, Solving & CFD 2 August 23, 2017 03:35
Crash with interDyMFoam + dynamicRefineFvMesh + 64procs RobertoRibeiro OpenFOAM Bugs 1 April 10, 2017 12:11
Simulation crash with dynamicRefineFvMesh and kOmegaSST - OF 2.3.x nathanael OpenFOAM Running, Solving & CFD 4 June 29, 2014 18:02


All times are GMT -4. The time now is 09:44.