CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Combination of dynamicMesh solver & layer addition/removal

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

Like Tree1Likes
  • 1 Post By goeran

LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2018, 13:56
Default Combination of dynamicMesh solver & layer addition/removal
New Member
Martn Flintstone
Join Date: May 2018
Posts: 3
Rep Power: 7
martn is on a distinguished road
Hi guys,

I use OF 1712 and want to simulate a engine motion with a moving piston & valves. The aim is to do it with topological changes of the mesh.
I created a case with the movingConeTopoFvMesh class. The mesh is build up like a moving piston in a cylinder which compresses air. The creation of a meshModifier file within the layerAdditionRemoval type complete my case. It works fine! The air is compressed like it should and the layers are removed (compression) and added (expansion).

Now I want to go further with the layerAdditionRemoval to the valves but without using the movingConeTopoFvMesh class. In the first steps I just replace the movingConeTopoFvMesh with the dynamicMotionSolverTopoFvMesh and the displacementInterpolation solver. So I am able to use a motion function for the moving parts. But despite using the meshModifier with the layerAdditionRemoval it is not working. No layers are chaniging. The cells are compressed by the motion.

Is this combination just not working or what should I change to use layerAR with another motion class except of the movingConeTopoFvMesh. The aim is to use a motion solver which I can predefine a motion function.

Best wishes,
Attached Files
File Type: txt meshModifiers.txt (1.0 KB, 175 views)
File Type: txt dynamicMeshDict.txt (1.1 KB, 173 views)

Last edited by martn; September 16, 2018 at 03:24. Reason: Attached files
martn is offline   Reply With Quote

Old   September 16, 2018, 15:43
Senior Member
Join Date: Jan 2016
Posts: 416
Rep Power: 13
simrego is on a distinguished road

You should check the tutorial:
I think you will need something like that.

Here you can find an example video about the same motion solver +LAR + AMI (This is my dummy video, just made for some explanation earier...) :

But you can also write your own motion solver which will create the topology modifiers for you on the fly.
simrego is offline   Reply With Quote

Old   September 20, 2018, 03:28
New Member
Martn Flintstone
Join Date: May 2018
Posts: 3
Rep Power: 7
martn is on a distinguished road
This looks great!
Thank you!

I am just trying this tutorial but I want to define a motion in the pointDisplacement file with the type of "uniformInterpolatedDisplacement". I think this is the right type to predefine a motion with a table of time & coordinates but I do not know how to create this "table"-file.
I always get the error:
Did not find any times with table
I looked in the "uniformInterpolatedDiscplacementPointPatchVectorF ield.C" file
public fixedValuePointPatchField<vector>
    // Private data

        //- Name of displacement field
        const word fieldName_;

        const word interpolationScheme_;

        //- Times with pre-specified displacement
        wordList timeNames_;

        //- Times with pre-specified displacement
        scalarField timeVals_;

        //- User-specified interpolator
        autoPtr<interpolationWeights> interpolatorPtr_;

        //- Cached interpolation times
        labelList currentIndices_;

        //- Cached interpolation weights
        scalarField currentWeights_;
But I do not find out in which form the file with the time table must be. I used something like this:
(0.00000000 (0 0 0))
(0.00008333 (5.483e-06 0 0))
(0.00016667 (2.193e-05 0 0))
(0.00025000 (4.9337e-05 0 0))
(0.00033333 (8.7694e-05 0 0))
(0.00041667 (0.000136991 0 0))
(0.00050000 (0.000197212 0 0))
(0.00058333 (0.000268339 0 0))
(0.00066667 (0.00035035 0 0))
(0.00075000 (0.00044322 0 0))
with the time in the first column and the coordinates of the motion in the second column but it didn't work.
Does anybody know more about this?
martn is offline   Reply With Quote

Old   August 14, 2020, 03:09
Default Full case
New Member
Goeran Gabriel
Join Date: Oct 2016
Posts: 5
Rep Power: 8
goeran is on a distinguished road
Hey Martn,
just found this Thread. I actually can't help you and I assume you finished this work

But would it be possible, that you provide the whole case? I am working on a moving piston simulation as well, but I can't get the layerAdditionRemoval modifier to work as supossed.

2538sukham likes this.
goeran is offline   Reply With Quote

Old   June 16, 2022, 06:15
Default MovingCone
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 49
Rep Power: 5
2538sukham is on a distinguished road
The source code is your friend. The faces which will move are hard coded and the movement is specific for x direction only. It uses motion masking and moving the points nin the motion mask. I did layer removal which works fine but after some removals the face begins collapsing onto itself which should not occur. I can happily share the code for you to check if it works on your machine.
With regards
2538sukham is offline   Reply With Quote


dynamic mesh, dynamicfvmesh, layer addition removal, movingconetopofvmesh

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
[snappyHexMesh] snappyHexMesh Boundary Layer at Corner panpanzhong OpenFOAM Meshing & Mesh Conversion 5 July 3, 2018 05:53
[snappyHexMesh] Problem airfoil snappyhexmesh add layer bye bye my blue OpenFOAM Meshing & Mesh Conversion 1 May 5, 2017 05:56
Hybrid discretisation - blend factor gcoopermax CFX 5 September 23, 2016 08:05
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
2D boundary layer solver (STAN7) Chanaka Mallikarachchi Main CFD Forum 0 January 6, 2001 00:13

All times are GMT -4. The time now is 13:27.