|
[Sponsors] |
Manually updating cellDisplacement in displacementMotionSolver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 18, 2021, 15:47 |
Manually updating cellDisplacement in displacementMotionSolver
|
#1 |
New Member
fabien farella
Join Date: Mar 2016
Posts: 2
Rep Power: 0 |
Hi!
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: Code:
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)); mesh.movePoints(newPoints); forAll(cellDisplacement, celli) { cellDisplacement.primitiveFieldRef()[celli] = oldDisplacement[celli] + (mesh.C()[celli] - oldC[celli]); } forAll(pointDisplacement, pointi) { pointDisplacement.primitiveFieldRef()[pointi] = newPoints[pointi] - points0[pointi]; } cellDisplacement.correctBoundaryConditions(); 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!!! |
|
Tags |
celldisplacement, cfmesh, displacementmotionsolver |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[IHFOAM] The IHFOAM Thread | Phicau | OpenFOAM Community Contributions | 392 | September 8, 2023 19:10 |
objects oscillate at high speed causing collapse in Dynamic mesh and overset mesh ca | insane | OpenFOAM Running, Solving & CFD | 0 | May 17, 2020 23:35 |
interFoam wave propagation and explosion of Courant number and residuals | ChiaraViola | OpenFOAM Running, Solving & CFD | 1 | June 26, 2019 06:36 |
[Workbench] Updating ICEM during DOE leads to incompatibility with Fluent | Gottkanzler | ANSYS Meshing & Geometry | 1 | June 12, 2019 07:30 |
[ICEM] Tips dealing with problem tets/tri manually without complete remesh | FreeFall79 | ANSYS Meshing & Geometry | 5 | November 19, 2013 18:52 |