CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] Prevent cell skewing in DynamicMesh ???

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2016, 12:28
Question Prevent cell skewing in DynamicMesh ???
  #1
New Member
 
anonymous
Join Date: Jul 2015
Posts: 21
Rep Power: 11
iy-a is on a distinguished road
I am simulating a 2D flow around a rotating structure,
using dynamicMeshDict with sixDoFRigidBodyMotion solver,
based on pimpleDyMFoam's wingmotion example.

Attached pictures show how cell skewness increased just
before simulation diverges completely because of mesh unconsistency.

Do I have to specify an other solver for the mesh to stay consistent ?
If yes, can I keep information (blue) containted the solver's "Coeffs" ?

I am using OF 4.
iy-a.


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

solver sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
patches (wing);
innerDistance 0.3;
outerDistance 1;

mass 17;
centreOfMass (0.5 0 0.125);
momentOfInertia (1 1 2);
orientation
(
0.9953705935 0.09611129781 0
-0.09611129781 0.9953705935 0
0 0 1
);

g (0 0 -9.81);
rho rhoInf;
rhoInf 1;
report on;

solver
{
type symplectic;
}

constraints
{
yLine
{
sixDoFRigidBodyMotionConstrain
t line;
centreOfRotation (0.5 0 0.125);
direction (0 1 0);
}

xLine
{
sixDoFRigidBodyMotionConstrain
t line;
direction (1 0 0);
}

zAxis
{
sixDoFRigidBodyMotionConstrain
t axis;
axis (0 0 1);
}
}


}


// ************************************************** *********************** //
Attached Images
File Type: png rsz_mesh0.png (139.1 KB, 28 views)
File Type: jpg rsz_mesh1.jpg (200.1 KB, 30 views)
iy-a is offline   Reply With Quote

Old   August 11, 2016, 04:56
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Please have a look at the cyclicAMI interface (look for the mixervessel2D tutorial). This can give you a sliding interface, which you will need to keep the mesh from distorting.
tomf is offline   Reply With Quote

Old   August 11, 2016, 08:29
Default
  #3
New Member
 
anonymous
Join Date: Jul 2015
Posts: 21
Rep Power: 11
iy-a is on a distinguished road
Thank you Tom for the quick answer.

I have looked at the mixervesselAMI2D example,
and tried to replace the projectionSurface.stl and
dynamicMeshDict with mines but the mesh stayed circular.
I guess I have to generate a bunch of other files,
including the blockMeshDict. But for my geometry,
snappyHexMeshDict is needed, as in the propeller example.

Thus, I have tried to look at the files responsible of changing
the topology. It seems here that topoSet (selecting AMI patch cells)
and blockMesh (re-making mesh) are running in a loop in the Allrun file.
But I don't get how to set blockMesh / snappyHexMesh in my specific case.

I am now trying to follow these steps :
- implement topoSetDict with cellSet (?) criteria, detecting distorted cells.
- and then createPatch -overwrite (as in the propeller example) to set
the moving AMI ?

I'd appreciate some guidance/documentation on how to set up
blockMesh and SHM dictionaries acccording to AMI settings.
iy-a is offline   Reply With Quote

Old   August 11, 2016, 09:07
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
The propellor tutorial also uses AMI interfaces, so I think you should look at how they are created and try to understand how this works (Look at the topoSet and createPatch parts and carefully investigate the snappyHexMeshDict).

The general idea is that you create a pair of patches, one connected to the rotating part of the mesh, the other to the stagnant part of the mesh. Try to go over the propellor tutorial until you understand every step, than replace that geometry with your geometry and keep track of te orientation that is needed.

Hope this helps.

Kind regards,
Tom
tomf is offline   Reply With Quote

Old   August 12, 2016, 11:47
Default
  #5
New Member
 
anonymous
Join Date: Jul 2015
Posts: 21
Rep Power: 11
iy-a is on a distinguished road
Thanks ! But it is tricky to tweak as the following points are the main differences with the propeller case :

- mine is 2D and has to stay as it is, as I need to carry lots of tests.
- mine is vertical , propeller is horizontal.
- mine is passive, propeller has an imposed spin.

For the last point, I guess I just have to replace the dynamicMeshDict with mine.
However, the penultimate point assumes that I should make the cyclicAMI spinning
along a different axis, or change the "container" geometry, and maybe its inlet/outlet.
It is hard to make these two cases merge as they function very differently :

- 2D wingmotion case separates its SHM,simpleFoam,pimpleDyMFoam in 3 directories.
- I tried to make cylinders intersect with my initial geometry in order to implement cyclicAMI but it is not sufficient to make it work.

I've struggled two days trying to adapt wingmotion2D on a cyclicAMI,
and didn't succeed in anything. I Found old examples of 2D passive cyclicAMI
with I/O as fanwing2D but after many file repairs to make it compatible with OF4 solver still complained.

Thus, it would probably be easier to modify mixervessel2DAMI's example, as you suggested.
But it doesn't have any snappyHexMeshDict, and I might have to use swiftSnap to make myself one.
projectionSurface.stl is the cyclicAMI open surface as far as I understood from visualizing it, and topoSetDict
gets the AMI foam file from polyMesyh/sets/AMI. These are the steps I would like to accomplish :

- change the "rotor" and "stator" geometries with mine. Is swiftSnap appropriate to generate their mesh directories ?
- Add inlet / outlet zones, but not sure how to proceed for this, as this example has no I/O initially. Any clue appreciated.
iy-a is offline   Reply With Quote

Old   August 12, 2016, 13:23
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Yes, you need to have 2D mesh with AMI to get what you want. I hope someone with more experience with snappyHexMesh, extrudeMesh and AMI can help you with that. For the inlet and outlet, you just need to expand your domain to the front and rear and than apply a fixed velocity inlet and a fixed pressure outlet (see for example the pitzDaily tutorials).
tomf is offline   Reply With Quote

Reply

Tags
cell, distorted, dynamicmeshdict, skewness, wingmotion


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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
Doubt about parallel processing vishwesh OpenFOAM Programming & Development 0 November 10, 2017 07:20
Partition: cell count = 0 metmet FLUENT 1 August 31, 2014 20:41
monitoring cell Jane Siemens 2 March 4, 2004 22:01
cell to cell relation CMB Siemens 1 December 4, 2003 05:05


All times are GMT -4. The time now is 20:48.