CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

Manually updating cellDisplacement in displacementMotionSolver

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2021, 14:47
Default Manually updating cellDisplacement in displacementMotionSolver
New Member
fabien farella
Join Date: Mar 2016
Posts: 2
Rep Power: 0
ffarella is on a distinguished road
I am pushing the displacementSBRStressFvMotionSolver to its limits when trying to run the equivalent of the SnakeRiver canyon, but with much higher resolution and complex topography.
I have modified moveDynamicMesh in order to check if the mesh contains incorrectly oriented face pyramids. It happens quiet often.
If it is the case, I load the mesh (at the end of a pimple loop) using the class Foam::Module:olyMeshGen and untangle it using Foam::Module::meshOptimizer.
I have modified the source of CFmesh in order to do that.
The problem is to re-assign the points back into the motionSolver. I understand I need to reset both the cellDisplacement and the pointDisplacement.
I tried this, but it doesnt work:

displacementSBRStressFvMotionSolver &motionSolver = const_cast<displacementSBRStressFvMotionSolver &>(mesh.lookupObject<displacementSBRStressFvMotionSolver>("dynamicMeshDict"));
const volVectorField oldDisplacement(motionSolver.cellDisplacement());
const pointField oldC(mesh.C());

// Here I optimize the points, where Foam::Module::polyMeshGen &pmg    
const pointField newPoints(optimizePoints(mesh, pmg, meshDict, report));
forAll(cellDisplacement, celli)
    cellDisplacement.primitiveFieldRef()[celli] = oldDisplacement[celli] + (mesh.C()[celli] - oldC[celli]);
forAll(pointDisplacement, pointi)
    pointDisplacement.primitiveFieldRef()[pointi] = newPoints[pointi] - points0[pointi];
The change doesnt need to propagate, as I get again errors the iteration after.
But if i stop the simulation, improve the mesh using improveMeshQuality, and restart the solver, it works fine.
Any idea how to solve this?
Many thanks!!!
ffarella is offline   Reply With Quote


celldisplacement, cfmesh, displacementmotionsolver

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[IHFOAM] The IHFOAM Thread Phicau OpenFOAM Community Contributions 392 September 8, 2023 18:10
objects oscillate at high speed causing collapse in Dynamic mesh and overset mesh ca insane OpenFOAM Running, Solving & CFD 0 May 17, 2020 22:35
interFoam wave propagation and explosion of Courant number and residuals ChiaraViola OpenFOAM Running, Solving & CFD 1 June 26, 2019 05:36
[Workbench] Updating ICEM during DOE leads to incompatibility with Fluent Gottkanzler ANSYS Meshing & Geometry 1 June 12, 2019 06:30
[ICEM] Tips dealing with problem tets/tri manually without complete remesh FreeFall79 ANSYS Meshing & Geometry 5 November 19, 2013 17:52

All times are GMT -4. The time now is 14:28.