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

Valve Motion with sliding mesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 30, 2018, 02:52
Default Valve Motion with sliding mesh
  #1
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 16
mecbe2002 is on a distinguished road
Hi all,

I want to simulate linear valve motion from fully opened position to maximum close position. Please look at the attached picture for the schematic sketch of the problem.

fluid is air with pressure at inlet 50 bar.
I want to study the change in Mass flow bcz of valve movement.

Could you please help me to setup the problem,
1) Meshing - Sliding mesh?
2) What solver to use?
3) how to setup mesh motion?

Thanks
KGN
Attached Images
File Type: png valve Motion.png (18.9 KB, 145 views)
mecbe2002 is offline   Reply With Quote

Old   November 30, 2018, 04:38
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
Hi!


1) You will have to use sliding mesh or you will have an incredibly distorted mesh and probably your solver will blow up.


2) For the solver you will need a transient solver with mesh motion. For example pimpleDyMFoam. (In the latest OF versions I think they merged this solver into pimpleFoam, but i'm not sure) After that you can try with a compressible solver but for the first step I think it will be enough to setup the case with an incompressible solver.


3) There is a linearValve(Layers)FvMesh motion solver which could be good for you, but last time i tried to use this, the code was commented out during the compilation but even if i compiled it it was a disaster to set up properly (no success for me, and there are many posts about it but I think it's still unsolved.)
So you will have to do everything manually.

You will need a cellZone in front of the piston for the motion, and an ACMI interface at the sliding faces.

You will have to do the same thing as in this video (I made it for explanation in a previous post, but I don't know where is this case so I can't share it with you) :

https://www.youtube.com/watch?v=mcWCuTLolFg


I suggest you to do the same case as in the video to understand the steps, then you can adapt it to your needs easily.
Steps:
1, create 2 mesh blocks near each others (You don't need conformal joining since the motion will destroy it anyways). Use ACMI for the joining patches. Run the case to test the ACMI (the boundary conditions are up to you, but you must use the ACMI at the joining)
2, Add mesh motion to any of the upper or lower walls. You can use for example displacementMotionSolver or displacementLayeredMotionSolver (this is for layer addition/removal, but a bit tricky to set up properly).
simrego is offline   Reply With Quote

Old   December 2, 2018, 20:03
Default
  #3
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 16
mecbe2002 is on a distinguished road
Thanks for the reply. I will try the method you suggested.
mecbe2002 is offline   Reply With Quote

Old   December 3, 2018, 00:38
Default
  #4
Senior Member
 
sheaker's Avatar
 
Oskar
Join Date: Nov 2015
Location: Poland
Posts: 184
Rep Power: 10
sheaker is on a distinguished road
There is a "sonicTurbDymEngineFoam" with valve motion but I was unable to make it run in 3d.

2d example works just fine like in the videos:
https://www.youtube.com/watch?v=jVls41R8j_c

https://www.youtube.com/watch?v=THJvHIk0n0Y


If You check my signature there is a link to specific post where You can find the case.


Have a nice day
Oskar
sheaker is offline   Reply With Quote

Old   December 3, 2018, 21:48
Default
  #5
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 16
mecbe2002 is on a distinguished road
Quote:
Originally Posted by simrego View Post
Hi!


1) You will have to use sliding mesh or you will have an incredibly distorted mesh and probably your solver will blow up.


2) For the solver you will need a transient solver with mesh motion. For example pimpleDyMFoam. (In the latest OF versions I think they merged this solver into pimpleFoam, but i'm not sure) After that you can try with a compressible solver but for the first step I think it will be enough to setup the case with an incompressible solver.


3) There is a linearValve(Layers)FvMesh motion solver which could be good for you, but last time i tried to use this, the code was commented out during the compilation but even if i compiled it it was a disaster to set up properly (no success for me, and there are many posts about it but I think it's still unsolved.)
So you will have to do everything manually.

You will need a cellZone in front of the piston for the motion, and an ACMI interface at the sliding faces.

You will have to do the same thing as in this video (I made it for explanation in a previous post, but I don't know where is this case so I can't share it with you) :

https://www.youtube.com/watch?v=mcWCuTLolFg


I suggest you to do the same case as in the video to understand the steps, then you can adapt it to your needs easily.
Steps:
1, create 2 mesh blocks near each others (You don't need conformal joining since the motion will destroy it anyways). Use ACMI for the joining patches. Run the case to test the ACMI (the boundary conditions are up to you, but you must use the ACMI at the joining)
2, Add mesh motion to any of the upper or lower walls. You can use for example displacementMotionSolver or displacementLayeredMotionSolver (this is for layer addition/removal, but a bit tricky to set up properly).
I am able to move the valve without mesh addition. Now i am trying to use "displacementLayeredMotionSolver ". But not able to find any reference to set the "dynamicMeshDict" file.
mecbe2002 is offline   Reply With Quote

Old   December 4, 2018, 03:45
Default
  #6
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
So the ACMI and the mesh motion is working?
(With the basic motionSolvers you will morph the whole mesh so don't worry if it is looks like you did it wrong. ). With the displacementLayeredMotionSolver you will be able to morph only the necessary cellZone.

Here you can find an example but this is for OF v1806 (The dictionary and the usage is the same for OF 5.x, 6.x, etc..)
https://develop.openfoam.com/Develop...nar/sphereDrop
And the source code (OF 6.x):
https://cpp.openfoam.org/v6/classFoa...r.html#details

As I remember you will have to define the pointDisplacement on the patches (0 folder), then in the displacementLayeredMotionSolver you can define the motion for the cellZone. (In your case you have to follow one of the faceZone/patch with the whole cellZone).
interpolatinSchemes:
-oneSided: the cellZone will follow one of the faces. For that you can use layer addition/removal
-linear: you will interpolate the motion in the cellZone between the two opposite patch(or faceZone) linearly (you compress and expand the cells). I suggest you to start with this.

Then you can add the meshModifiers to add and remove layers (if you use oneSided interpolation scheme). But for me it was only possible on a stationary wall. So I pushed the whole cellZone into the stationary wall and performed the layerAddition/Removal on that patch.

If you have any questions feel free to ask and I'll try to help you if i can, but I did it a long time ago so I don't remember everything perfectly. :S
simrego is offline   Reply With Quote

Old   December 4, 2018, 19:25
Default
  #7
Senior Member
 
KGN
Join Date: Oct 2009
Location: Chennai, India
Posts: 121
Rep Power: 16
mecbe2002 is on a distinguished road
Thanks I will try this.

Quote:
Originally Posted by simrego View Post
So the ACMI and the mesh motion is working?
(With the basic motionSolvers you will morph the whole mesh so don't worry if it is looks like you did it wrong. ). With the displacementLayeredMotionSolver you will be able to morph only the necessary cellZone.

Here you can find an example but this is for OF v1806 (The dictionary and the usage is the same for OF 5.x, 6.x, etc..)
https://develop.openfoam.com/Develop...nar/sphereDrop
And the source code (OF 6.x):
https://cpp.openfoam.org/v6/classFoa...r.html#details

As I remember you will have to define the pointDisplacement on the patches (0 folder), then in the displacementLayeredMotionSolver you can define the motion for the cellZone. (In your case you have to follow one of the faceZone/patch with the whole cellZone).
interpolatinSchemes:
-oneSided: the cellZone will follow one of the faces. For that you can use layer addition/removal
-linear: you will interpolate the motion in the cellZone between the two opposite patch(or faceZone) linearly (you compress and expand the cells). I suggest you to start with this.

Then you can add the meshModifiers to add and remove layers (if you use oneSided interpolation scheme). But for me it was only possible on a stationary wall. So I pushed the whole cellZone into the stationary wall and performed the layerAddition/Removal on that patch.

If you have any questions feel free to ask and I'll try to help you if i can, but I did it a long time ago so I don't remember everything perfectly. :S
mecbe2002 is offline   Reply With Quote

Reply

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
mesh quality problem for displacementSBRStress motion solver zhaozhenkai OpenFOAM 0 January 22, 2017 11:02
[Commercial meshers] Valve Motion in Mesh imported from KIVA. AA29 OpenFOAM Meshing & Mesh Conversion 5 May 1, 2016 13:38
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 10:08
Mesh motion with sliding interface problem sebastian_neumann OpenFOAM Running, Solving & CFD 0 December 16, 2008 09:26
Automatic Mesh Motion solver michele OpenFOAM Running, Solving & CFD 10 September 26, 2005 08:21


All times are GMT -4. The time now is 10:22.