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

two different motion solver for dynamicMeshDict

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By wyldckat
  • 2 Post By albcem
  • 1 Post By Weidong Dai
  • 5 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2015, 07:40
Default two different motion solver for dynamicMeshDict
  #1
New Member
 
Join Date: Oct 2014
Posts: 24
Rep Power: 11
DrFloyd is on a distinguished road
Dear foamers,

I hope you can help me about an intersting mesh motion in openfoam.
Simply I would want to use two different motion solver to move mesh, for example:

motion1:
dynamicFvMeshLibs 1("libtopoChangerFvMesh.so");
dynamicFvMesh movingTopoFvMesh;

and

motion2:
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
solver displacementLaplacian;

i would like to put these two into dynamicMeshDict together. Can you help me to edit the file?
Thankyou in advance.
DrFloyd is offline   Reply With Quote

Old   December 1, 2015, 15:50
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: As far as I know, this is not yet possible up to OpenFOAM 3.0, namely to have two different types of dynamic mesh operations at the same time.
DrFloyd likes this.
__________________
wyldckat is offline   Reply With Quote

Old   December 2, 2015, 02:51
Default
  #3
New Member
 
Join Date: Oct 2014
Posts: 24
Rep Power: 11
DrFloyd is on a distinguished road
Thanks for your reply Bruno,
I have a couple of question for you:

first: how can you know that of3.0 has this possibility.
second: in this case how can i find the instructions to edit this dynamicMeshDict (at the moment I only saw the dynamicMeshDict in the tutorials cases but I didn't find anything of similar).

All the best
DrFloyd is offline   Reply With Quote

Old   December 2, 2015, 09:32
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Dear Floyed,

as Bruno said, up to version 3.0 there is no motion library that couples the mesh motion (normally moving the boundary and solving the laplace equation for the cell centers for smoothing the internal mesh) and the topoChanger (which actually change the topologiy of your mesh by removing or adding cells).

If you want to do sth. like that you have to couple the mesh motion solver and the topoChanger libs. I also combined these two libs but still I did not get a working lib. Compiling is fine but after starting I get an segmentation fault error. Up to now I have not too much time to investigate into this but it is possbile because a guy from Linz did it already and presented it in PFAU9 last year in Linz.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 2, 2015, 10:34
Default
  #5
New Member
 
Join Date: Oct 2014
Posts: 24
Rep Power: 11
DrFloyd is on a distinguished road
Dear Tobi,

thankyou for your reply. I understood that for the coupling i have to modify the source code, that is put in the same source file both codes (motion and topological changes), is it right? it would be great if you explain me the first steps to do for the coupling.
Best regards.
DrFloyd is offline   Reply With Quote

Old   December 2, 2015, 11:33
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by DrFloyd View Post
Dear Tobi,

thankyou for your reply. I understood that for the coupling i have to modify the source code, that is put in the same source file both codes (motion and topological changes), is it right? it would be great if you explain me the first steps to do for the coupling.
Best regards.

Hi,

not really. You have to write your lib in a way that you first call the motion lib which will actually move the mesh due to boundary conditions. Then you have to write a code that will check the topology of the mesh (like in movingConeTopoFvMesh) which also include your conditions when you will remove cells and so on and then you have to call the topoChanger lib with the necessary information. This will at least change the topology.



Kind regards,
Tobi
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 23, 2015, 01:54
Default
  #7
Member
 
Cem Albukrek
Join Date: Mar 2009
Posts: 52
Rep Power: 17
albcem is on a distinguished road
Hello Dr Floyd,

I have been struggling with this problem myself. Depending on your goal, I have a somewhat quick and certainly dirty workaround:

If your goal is to apply the two mesh modifications sequentially, but not in a coupled manner and if the first motion has to happen only once or less often (in my case, I wanted to move an airplane wing flap down and then move forward with a 6 DOF body motion solver for the whole system), here are the steps:

1. Run case with mesh motion 1 alone.
2. Export the dynamic mesh output with the point/cell displacement files into a new "fixed"/basic mesh
3. Edit your dynamic mesh dictionary and point displacement files to reflect your motion 2 goals
4. Run the case with mesh motion 2 alone.

As you see, the 2 motions will be run sequentially, not together...

Now here comes the dirty part which is in step 2: I could not find 1 single OpenFOAM command to export a dynamic mesh to fixed mesh (no point/cell displacement files). So I converted the dynamic mesh to Fluent format (foamMeshToFluent) and then back to OpenFoam format (fluent3DMeshToFoam). It all worked in the end, but I would love to hear of a hidden command for the dynamic to fixed mesh conversion within native OpenFoam formats...

Regards,

Cem
Michael@UW and Zane like this.
albcem is offline   Reply With Quote

Old   June 21, 2017, 11:22
Default two motion solvers...
  #8
New Member
 
Join Date: Dec 2012
Posts: 3
Rep Power: 13
nimrod is on a distinguished road
Hi Foamers,

I am reading this thread because I have a similar issue - trying to simulate a two-stroke engine, and need to include cell layer removal/addition in the cylinder as well as constant rotation of the volume around the crankshaft.

I hope somebody can point me to the answers for my many questions below please:

1. Where and who could provide detailed insights into this modeling technique?
2. Is it possible to combine a movingConeTopo and a constantVelocity motion in one model, for the cylinder and crankshaft mentioned above?
3. Would it be worth starting to experiment with movingCone (without cell removal/addition) for the cylinder combined with constantVelocity for crankshaft rotation?

I am using OpenFoam 4.x and the rhoPimpleDyMFoam solver.

I have already spent a few months trying to figure out the model setup process. In the meantime, I have setup the whole model in Fluent in half a day... Kind of frustrating.

Many thanks,
nimrod
nimrod is offline   Reply With Quote

Old   July 9, 2018, 11:05
Default Two types of dynamic mesh at same time.
  #9
New Member
 
Weidong Dai
Join Date: Oct 2016
Location: Edinburgh, Scotland, UK
Posts: 9
Rep Power: 9
Weidong Dai is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: As far as I know, this is not yet possible up to OpenFOAM 3.0, namely to have two different types of dynamic mesh operations at the same time.
Hi, wyldckat, I met a similar problem, I just wonder how OpenFOAM 3.0 achieve this. Is there a tutorial for that? My problem is a turbine blade rotating at a constant angular velocity, but at the same time, it will passively pitch. I was thinking using sliding mesh for the rotation and 6 DOF for the passive pitch, can those two solvers apply at the same time? Thank you.
Jim_Hao likes this.
Weidong Dai is offline   Reply With Quote

Old   July 10, 2018, 06:47
Default
  #10
New Member
 
Weidong Dai
Join Date: Oct 2016
Location: Edinburgh, Scotland, UK
Posts: 9
Rep Power: 9
Weidong Dai is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Dear Floyed,

as Bruno said, up to version 3.0 there is no motion library that couples the mesh motion (normally moving the boundary and solving the laplace equation for the cell centers for smoothing the internal mesh) and the topoChanger (which actually change the topologiy of your mesh by removing or adding cells).

If you want to do sth. like that you have to couple the mesh motion solver and the topoChanger libs. I also combined these two libs but still I did not get a working lib. Compiling is fine but after starting I get an segmentation fault error. Up to now I have not too much time to investigate into this but it is possbile because a guy from Linz did it already and presented it in PFAU9 last year in Linz.
Hi Tobi, I just wonder which motion library that couples the mesh motion in version 3.0. Is that multiSolver or there is anything something else? Thank you.
Weidong Dai is offline   Reply With Quote

Old   February 3, 2019, 15:52
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Just a quick note: As of the 23rd of January 2019, it has been implemented into OpenFOAM-dev the ability to have multiple motion solvers: https://github.com/OpenFOAM/OpenFOAM...949a8ebc4d7d01
wyldckat is offline   Reply With Quote

Old   April 12, 2019, 11:51
Default
  #12
New Member
 
Jianming
Join Date: Dec 2016
Posts: 3
Rep Power: 9
Jim_Hao is on a distinguished road
Quote:
Originally Posted by Weidong Dai View Post
Hi, wyldckat, I met a similar problem, I just wonder how OpenFOAM 3.0 achieve this. Is there a tutorial for that? My problem is a turbine blade rotating at a constant angular velocity, but at the same time, it will passively pitch. I was thinking using sliding mesh for the rotation and 6 DOF for the passive pitch, can those two solvers apply at the same time? Thank you.
Dear Weidong,

I have a similar issue as yours. I need to combine the sliding mesh solver with the 6DoF rigid body motion solver.
Have you solved your problem?

Thanks,
Jianming
Jim_Hao is offline   Reply With Quote

Old   September 12, 2023, 12:27
Default
  #13
New Member
 
Huang, Ching-Chan
Join Date: Jan 2023
Posts: 14
Rep Power: 3
Allen_Huang is on a distinguished road
Is it possible to use two kind of motion solvers to simulate the [displacement] and [rotation] at the same time. First move the boundary patch up and down, then rotating the cell inside boundary area. Moreover, how to set the refinmemtSurface of the boundary patch area.
Allen_Huang is offline   Reply With Quote

Reply

Tags
displacementlaplacian, dynamicmeshdict, movingtopofvmesh


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
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
Getting too many iterations by velocity solving (aborting). Changing U - Solver? suitup OpenFOAM Running, Solving & CFD 0 January 20, 2010 07:45
Motion diffusivity solver has problems with patches moving toward each other bfa OpenFOAM Running, Solving & CFD 2 July 8, 2009 21:35
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09


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