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

Combining dynamic mesh motion and refinement OF-v2206

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Paul R

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2024, 10:15
Cool Combining dynamic mesh motion and refinement OF-v2206
  #1
New Member
 
Paul R
Join Date: Jun 2023
Posts: 2
Rep Power: 0
Paul R is on a distinguished road
Hello everyone,

I am trying to combine dynamicMotionSolverFvMesh with dynamicRefineFvMesh using esi version of OpenFOAM-v2206.

I went across multiple post like this one : https://shorturl.at/tFHY8
And other link like this one : https://shorturl.at/exyX0

That explain quite clearly how to do it on OpenFOAM-2.4.x
Eventho, it was not the same version of Openfoam I tried to follow as best as possible the main steps to achieve that.

Those steps are :
- Copying dynamicRefineFvMesh and rename it as dynamicMotionSolverRefineFvMesh
- Replace inside the .H and .C file the dynamicRefineFvMesh by dynamicMotionSolverRefineFvMesh
- Add fiew lines inside the Make/files and Make/options.
- Then create a motion pointer inside the .H file. / Add to the .H and .C the correct files at the beginning ("#include ....H") / Add to the .C file the functions used inside the dynamicMotionSolverFvMesh to move points.
- Compile the new solver.
- Modify the dynamicMeshDict.

But when I run it I encounter this error message :

''""
--> FOAM FATAL ERROR: (openfoam-2206)
The number of points in the mesh seems to have changed.
In constant/polyMesh there are 141254 points; in the current mesh there are 231329 points.

From virtual void Foam::sixDoFRigidBodyMotionSolver::solve()
in file sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C at line 195.

FOAM exiting
''""

What I understand is that after refining the mesh, sixDoFRigidBodyMotionSolver (which is the motionSolver) is still looking for mesh infos inside my constant/polyMesh folder which is not updated. Instead it should be looking at the ones created by the refinement part inside the steps folders "0", "0.5"...

So I tried to ckeck where the mesh informations are transmitted to the motionSolver to resolve this but a clear lack of C++ skills on my side is making it really difficult.
Is there a way to fix this ?
Maybe by updating at every step the constant/polyMesh folder or by pointing the input of the motionSolver to the step folders...

Moreover, I did some testing on my case :
When I remove the moving object the refinement is working and the simulation runs properly.
When I put a threshold impossible to reach for my refinement, the motion part is working and the simulation runs properly.

Those two tests makes me think that I am not that far from merging the two solvers but I'm not quite there yet.
I'll attached the dynamicMeshDict and the solver .C, Template.C, .H, Make/options and Make/files files to this post.

Thank you for your help and your time !
Attached Files
File Type: zip dynamicMotionSolverRefineFvMesh.zip (15.9 KB, 1 views)
jbo likes this.

Last edited by Paul R; February 22, 2024 at 11:32.
Paul R is offline   Reply With Quote

Old   August 5, 2024, 04:42
Default
  #2
jbo
New Member
 
Join Date: Jun 2024
Posts: 5
Rep Power: 2
jbo is on a distinguished road
Hi Paul,
I'm also exploring the combination of dynamic mesh motion and refinement.
Have you managed to get it to work?
Looking forward to your response.
Best,
Julien
jbo is offline   Reply With Quote

Old   November 8, 2024, 06:20
Default
  #3
New Member
 
Paul R
Join Date: Jun 2023
Posts: 2
Rep Power: 0
Paul R is on a distinguished road
Hi Julien,

Sorry for the late reply, I moved on to an other project whithout finding a solution for this one.

However, if anyone find something, i'll still be interested !
Best of luck,

Paul
Paul R is offline   Reply With Quote

Reply

Tags
dynamic mesh, solver coupling, waves multiphaseinterfoam


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
mesh refinement and mesh motion Jim1310 OpenFOAM Running, Solving & CFD 1 December 22, 2023 07:45
flow over cylinder in openFoam saeed jamshidi OpenFOAM Pre-Processing 3 August 11, 2023 16:16
Combining mesh motion and refinement mturcios777 OpenFOAM Programming & Development 15 September 16, 2022 02:04
Mesh Disappering with Dynamic Mesh FaroukH FLUENT 0 February 23, 2021 19:26
Interesting Bug in InterDyMFOAM (Dynamic Mesh Refinement) parallel restart mostanad OpenFOAM Programming & Development 1 November 24, 2020 05:07


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