CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] My layerAdditionRemoval demo (https://www.cfd-online.com/Forums/openfoam-meshing/152060-my-layeradditionremoval-demo.html)

Ilya Sivkov April 23, 2015 02:57

My layerAdditionRemoval demo
 
1 Attachment(s)
Hi,

after a week of meditation at OpenFOAM sources and examples of dynamic layering, I made it works!

Attachment 38965

It uses interDyMPimple solver with movingConeTopoFvMesh and layerAdditionRemoval modifiers.

Here I described all steps: https://ilyasivkov.wordpress.com/201...h-in-openfoam/

Ilya.

PicklER April 23, 2015 03:30

Hi Ilya

This looks super promising. Thank you so much! Will give feedback before the end of the week.

PicklER April 25, 2015 12:35

Hi Ilya

This demo is really awesome, thank you again. I tried to recreate your results by editing the damBreakWithObstacle tutorial case and adding the specified files of yours and I think I got it. I want to simulate the regression burn in a solid rocket motor.

1. Do you know if it is possible to set the velocity (motionVelAmplitude) of the moving boundary according to a dynamic variable calculated at each time step in the solver?

2. Is it possible to set this velocity for each cell on the boundary?

I want to calculate the burn rate (mm/s) of each cell on the boundary and set the motionVelAmplitude equal to this.

Thank you in advance

Ilya Sivkov April 26, 2015 04:45

Hi, PickIER,

As for motionVelAmplitude, it is always fixed. Field-dependent mesh movement is another powerful future op OpenFOAM, but I have not learned it yet.

As for the engine, I am not sure you need moving mesh. Maybe, two-phase solvers can be used.

Also I googled with "openfoam solid fuel mass flow" and found some articles:
http://mediatum.ub.tum.de/doc/1226724/1226724.pdf
http://projekter.aau.dk/projekter/fi...784/Report.pdf
http://staff.polito.it/pietro.asinar...i_CPC_2011.pdf

Tobi August 11, 2015 08:15

Hi all,

thanks for sharing your steps. It work very well. I have a question to you, do you know how to deal with boundarys that are moved due to velocity and you want to add adding/removing cells due to deformation.

Imagine a pistion that is moving up. The mesh is compressed and after a special compression of the first cells you want to delete these cells.

With dynamicMotionSolverFvMesh its not possible I think.

kkpal December 2, 2015 23:30

I wonder if it's possible to do this kind add/removal on a curved surface? i.e., the moving object locates on the surface of a circular cylinder:confused:

abigail_s October 12, 2016 15:22

Any updates?
 
Hi I am working with a floating object with a modification of interDyMFoam and my structure deforms the mesh due to unstable buoyant forces (which is a separate issue in itself :o). I have not been able to have the laterAdditionRemoval to work with the dynamicMotionSolverFvMesh using the steps in Ilya's tutorial.

Quote:

Originally Posted by Tobi (Post 559106)
With dynamicMotionSolverFvMesh its not possible I think.

Has anyone else other than Tobias tried this? Any success? Any suggestions?

Thanks!
Abbie

zarox March 3, 2017 10:37

Hi,

I hope you find some solution Abbie. I am currently looking at dynamic Mesh, and as Tobi said, that is not possible with the basic solver dynamicMotionSolverFvMesh to do add/removal cell, because it is a topological change and the solver is build in order to have no topological change. The movingConeTopoFvMesh is a derivated solver with topological change and morphing. I think the dynamic library give some brick and its own solver for its own case must be build as linearValveFvMesh (which is comment in the makefile for the topochangerFvMesh Library, in the Make/file note the */)...

At this point of my discovery of thedynamic library and topologic change, I am wondering if the layerAdditionRemoval utility can work on snap cell at a cylindrcal surface. I change the linearValveLayerFvMesh, to perform a simple add/remove layer (no sliding as for original).

When the code come to the point o do removal the result is
Code:

bool layerAdditionRemoval::changeTopology() const  for object layer :
Layer thickness: min: 3.91886e-06 max: 8.83989e-06 avg: 6.06556e-06 old thickness: 6.08116e-06
Removal threshold: 4e-06 addition threshold: 2.5e-05
layerAdditionRemoval::clearAddressing()
    clearing pointsPairingPtr_
layerAdditionRemoval::clearAddressing()
    clearing facesPairingPtr_
Modifier 0 named layer unchanged

No removal is done, the collapse() is invalid, but I don't know why, perhaps because of the mesh that is not aligned layer but snap to a curved surface?

In LayerAdditonRemoval.C :
Code:

// Layers moving towards removal
        if (minDelta < minLayerThickness_)
        {
            // Check layer pairing
            if (setLayerPairing())
            {
                // A mesh layer detected.  Check that collapse is valid
                if (validCollapse())
                {
                    // At this point, info about moving the old mesh
                    // in a way to collapse the cells in the removed
                    // layer is available.  Not sure what to do with
                    // it.

                    if (debug)
                    {
                        Pout<< "bool layerAdditionRemoval::changeTopology() "
                            << " const for object " << name() << " : "
                            << "Triggering layer removal" << endl;
                    }

                    triggerRemoval_ = mesh.time().timeIndex();

                    // Old thickness looses meaning.
                    // Set it up to indicate layer removal
                    oldLayerThickness_ = GREAT;

                    topologicalChange = true;
                }
                else
                {
                    // No removal, clear addressing
                    clearAddressing();
                }
            }
        }


fumitaka November 20, 2017 08:14

to move an obstacle y axis
 
Hi

Putting the grate demo of ilya's moving obstacle into practice, i wanna make the case in which an obstacle move along y axis.

Can I achive this goal with applying ilya's case? When I do "interDyMFoam",(it works until practicing setFields) MovingConeTopoFvMesh demand to define "leftEdge" in dynamicMeshDict.movingConeTopoFvMeshCoeffs ,dose it mean MovingConeTopoFvMesh can be only used in the case where the obstacle move along x axis???

einstein_zee October 8, 2019 09:53

movingPiston
 
Hiii foamers,

This thread is quite old but I think it will be a good place to continue the discussion here. I have been playing with "movingConeTopoFvMesh" for 3 days but I was not able to get it quite right for the case of a compressing piston. Even I've instantiated my own mesh changer out of "movingConeTopoFvMesh" and "topoChangerFvMesh" with some changes but still no success so far. somehow this addition and removal of layers doesn't work in 3d cases I guess.
In general, pressure field will be the most affected field when you have mesh motion with movingCone. And if you stabilize it z.B. by lowering the movement speed, then the layers are not created or destroyed in 3d cases.
does anyone have a clue on this ?


All times are GMT -4. The time now is 21:33.