CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[cfMesh] CFMesh cellZones

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2015, 06:22
Default CFMesh cellZones
  #1
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi

This is directed towards the cfMesh developers.

Is it possible to make a cellZone when meshing?

This is particular usefull when doing MRF or porous simulations.

For a MRF the cylinder zone the interface/boundary must be captured quite accurate.

You already have the primitives ready

Code:
objectRefinements
{
    insideTheBody
    {
        cellSize 10;
        type cone;
        p0  (0 0 -32);
        p1  (0 0 32);
        radius0  200;
        radius1  200;
    }

}
What is basically needed would be to have an option

Code:
snapMeshToInterface true;
That way the mesh should/could be clipped directly at the interface.

Then we can use the topoSet utility to extract the zone later on.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   October 15, 2015, 15:16
Default Use of createBaffles
  #2
Member
 
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 10
WernerW is on a distinguished road
Hi Niels,

I'm very interested in what you're trying to do. I'm trying to implement cfMesh for a case with the pimpleDyMFoam solver.

I guess could we do what you say (split meshes) with the command create Baffles that takes a faceZone and generates the master and slave patches. Is that right ?

there's a problem that I'm trying to solve before I try that. How do I define the patch "innerCylinderSmall" with the code inserted in objectRefinements so that I can create the faceZone "InnerCylinderSmall". Did you solve this already ?

Here the content of my createBafflesDict that I took from the openfoam 2.2.x propeller tutorial.

Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

internalFacesOnly true;

// Baffles to create.
baffles
{
baffleFaces
{
//- Use predefined faceZone to select faces and orientation.
type faceZone;
zoneName innerCylinderSmall;

patches
{
master
{
//- Master side patch
name AMI1;
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI2;
transform noOrdering;
}
slave
{
//- Slave side patch
name AMI2;
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI1;
transform noOrdering;
}
}
}
}
WernerW is offline   Reply With Quote

Old   October 15, 2015, 15:55
Default
  #3
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Quote:
I guess could we do what you say (split meshes) with the command create Baffles that takes a faceZone and generates the master and slave patches. Is that right ?
Yes, among other things.

But as said above you can not do zones in cfMesh.

It/when that gets in you can do what you want.

Until then we need to split the meshes in two parts and merge them together and make AMI's that way.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   October 15, 2015, 21:00
Default create cylindrical cellZone with createAMIFaces
  #4
Member
 
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 10
WernerW is on a distinguished road
I was able to create a Cellzone and a faceZone in a Cylinder in cfMesh mainly with the aplication createAMIFaces. I paste some relevant files and my Allrun scripts below.

system/createAMIFaces
Quote:
actions
( { name innerCylinderSmall;
type cellSet;
action new;
source cylinderToCell;
sourceInfo
{
p1 (-0.03 0 0);
p2 (0.12 0 0);
radius 0.3;
}
}
{
name outerCells;
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set innerCylinderSmall;
}
}
{
name outerCells;
type cellSet;
action invert;
}
{
name innerCylinderSmall;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set innerCylinderSmall;
}
}
{
name innerCylinderSmallFace;
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set innerCylinderSmall;
option all;
}
}
{
name innerCylinderSmallFace;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set outerCells;
option all;
}
}
{
name innerCylinderSmall;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet innerCylinderSmallFace;
cellSet innerCylinderSmall;
}
}
}
However the cellZone was formed by the cells whose center are in the Cylinder, what gave me a very rough "surface", if you may call it that way. Actually the mesh seems to be ok

When I executed the solver pimpleDyMFoam it actually ran but without rotating the dynamic Mesh and when I ran the moveDynamicMesh App it crashed with an error that I know only too well but do not understand.

Quote:
$ moveDynamicMesh -checkAMI

Create time
Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone innerCylinderSmall
Writing VTK files with weights of AMI patches.

Reading surface description:
zNormal
isoQ
rotor

forces forces:
Not including porosity effects

Time = 0.01
solidBodyMotionFunctions::rotatingMotion::transfor mation(): Time = 0.01 transformation: ((0 0 0) (0.999462 (-0.0327941 0 0)))
AMI: Creating addressing and weights between 2481 source faces and 2481 target faces
AMI: Patch source sum(weights) min/max/average = 0.408486, 4.37964, 1.12602
AMI: Patch target sum(weights) min/max/average = 0, 4.27694, 1.12089
--> FOAM Warning :
From function solidBodyMotionFvMesh::update()
in file solidBodyMotionFvMesh/solidBodyMotionFvMesh.C at line 238
Did not find volVectorField U Not updating Uboundary conditions.
Point usage OK.
Upper triangular ordering OK.
Topological cell zip-up check OK.
Face vertices OK.
Face-face connectivity OK.
Mesh topology OK.
Boundary openness (-1.37305e-17 1.1496e-16 3.12531e-16) OK.
Max cell openness = 3.28818e-16 OK.
Max aspect ratio = 8.16767 OK.
Minimum face area = 1.5248e-07. Maximum face area = 0.0105764. Face area magnitudes OK.
Min volume = 5.76824e-11. Max volume = 0.00107641. Total volume = 9.92291. Cell volumes OK.
Mesh non-orthogonality Max: 64.979 average: 14.3117
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 3.11889 OK.
Mesh geometry OK.
Mesh OK.
Calculating AMI weights between owner patch: AMI1 and neighbour patch: AMI2
ExecutionTime = 2.09 s ClockTime = 5 s

--> FOAM FATAL ERROR:

request for volVectorField U from objectRegistry region0 failed
available objects of type volVectorField are
0()

From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/werner/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam:bjectRegistry::lookupObject<Foam::Geometric Field<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
#3 Foam::Q::execute() at ??:?
#4 Foam::OutputFilterFunctionObject<Foam::Q>::execute (bool) at ??:?
#5 Foam::functionObjectList::execute(bool) at ??:?
#6 Foam::Time::run() const at ??:?
#7 Foam::Time::loop() at ??:?
#8 ? at ??:?
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? at ??:?
Aborted (core dumped)
What could be the source of this error ?
Attached Images
File Type: png 2015-10-15 crappy Cylinder .png (21.1 KB, 50 views)
Attached Files
File Type: zip A.zip (4.6 KB, 15 views)

Last edited by WernerW; October 16, 2015 at 10:49.
WernerW is offline   Reply With Quote

Old   October 16, 2015, 04:54
Default
  #5
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Quote:
what gave me a very rough "surface",
To have a rotating or sliding mesh you need an almost perfect interface for the AMI.

http://www.openfoam.org/version2.1.0/ami.php

That is why I proposed that cfMesh made something that splits the mesh at the cylinder interface to be able to have really nice interfaces.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   November 23, 2015, 14:11
Default
  #6
Member
 
Yuanchuan Liu
Join Date: Oct 2012
Posts: 31
Rep Power: 13
SailorLiu is on a distinguished road
Yes. I also use AMI quite a lot and this is a very good proposal. Interested to know if the developers are adding this to the next release.
SailorLiu is offline   Reply With Quote

Reply


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
[cfMesh] Compiling cfMesh with OpenFOAM 4.x dkokron OpenFOAM Community Contributions 16 August 15, 2018 11:26
[cfMesh] CFMesh for blue core CFD naveen.hariprasad OpenFOAM Community Contributions 2 March 4, 2018 16:11
[cfMesh] feature edge error zordiack OpenFOAM Community Contributions 3 October 11, 2016 06:09
[cfMesh] mesh improvements for 'face tets' pici OpenFOAM Community Contributions 1 September 2, 2015 04:31
DecomposePar and CellZones Anne Lincke OpenFOAM 4 October 13, 2010 09:18


All times are GMT -4. The time now is 19:39.