CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   two different motion solver for dynamicMeshDict (https://www.cfd-online.com/Forums/openfoam-solving/163555-two-different-motion-solver-dynamicmeshdict.html)

DrFloyd December 1, 2015 07:40

two different motion solver for dynamicMeshDict
 
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.

wyldckat December 1, 2015 15:50

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 December 2, 2015 02:51

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

Tobi December 2, 2015 09:32

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.

DrFloyd December 2, 2015 10:34

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.

Tobi December 2, 2015 11:33

Quote:

Originally Posted by DrFloyd (Post 575927)
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

albcem December 23, 2015 01:54

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

nimrod June 21, 2017 11:22

two motion solvers...
 
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

Weidong Dai July 9, 2018 11:05

Two types of dynamic mesh at same time.
 
Quote:

Originally Posted by wyldckat (Post 575843)
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.

Weidong Dai July 10, 2018 06:47

Quote:

Originally Posted by Tobi (Post 575922)
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? :confused: Thank you.

wyldckat February 3, 2019 15:52

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

Jim_Hao April 12, 2019 11:51

Quote:

Originally Posted by Weidong Dai (Post 698666)
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

Allen_Huang September 12, 2023 12:27

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.


All times are GMT -4. The time now is 18:45.