December 2, 2021, 20:15
|
Re-initialize everything during run-time without restarting simulation
|
#1
|
New Member
Nadun Palmada
Join Date: Apr 2017
Posts: 15
Rep Power: 9
|
Hi
I am currently running moving mesh simulations using OpenFOAM 5.x on pimpleDyMFoam, and I am wanting to run an initial timestep (say 0.1) where I deform the mesh to a newer mesh but reset the flow (back to initial conditions) at 0.1s and continue simulation.
The reason why I need to do this is because I found that by starting the mesh at a highly deformed state I can spring the mesh back to an undeformed state and further deform to a highly deformed state along the simulation (slightly more deformed that the initial) without the mesh breaking. I have run the moveDynamicMesh application through the entire simulation without the mesh breaking. But if I start at the resting or undeformed state then the mesh breaks.
I tried adjusting the pimpleDyMFoam application such that the code after mesh.update();
Code:
phi = mesh.Sf() & Uf;
if (mesh.changing() && correctPhi)
{
#include "correctPhi.H"
}
// Make the flux relative to the mesh motion
fvc::makeRelative(phi, U);
if (mesh.changing() && checkMeshCourantNo)
{
#include "meshCourantNo.H"
}
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
laminarTransport.correct();
turbulence->correct();
}
}
only runs after runTime.value() >= 0.2 , but this still resulted in extremely high velocities at the walls. I have also tried using manipulatePatchField and manipulateField swakFunctionObjects to adjust the field during run-time but this didn't seem to work.
Thanks
Nadun
|
|
|