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

[Other] extend existing mesh - saving old patch as faceZone and new cells as new cellZones

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Wikie

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 31, 2018, 04:46
Default extend existing mesh - saving old patch as faceZone and new cells as new cellZones
  #1
Member
 
Roman Gobitz-Pfeifer
Join Date: Dec 2009
Location: Stuttgart
Posts: 83
Rep Power: 16
Wikie is on a distinguished road
Dear all,


I'm struggling with an OpenFOAM problem and would need some help to solve it.

I want to extend the mesh of a straight pipe at one end. The new volume should be safed as new cellZone and the old patch should be safed as a faceZone - please see attachment below.

I was able to handle the first step by using extrudeMesh - see extrudeMeshDict below.

I'm struggling by keeping the old patch as faceZone and saving the new volume as a new cellZone.

Any idea how I can handle this?

remark: I'm using OF v1706


Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// What to extrude:
// patch : from patch of another case ('sourceCase')
// mesh : as above but with original case included
// surface : from externally read surface
constructFrom mesh;
sourceCase "../extrudeTest";
sourcePatches (outlet);
// If construct from patch: patch to use for back (can be same as sourcePatch)
exposedPatchName symBack;
// Flip surface normals before usage. Valid only for extrude from surface or
// patch.
flipNormals false;
//- Linear extrusion in point-normal direction
extrudeModel linearNormal;
nLayers 1;
expansionRatio 1.0;
linearNormalCoeffs
{
thickness 0.05;
}
// Do front and back need to be merged? Usually only makes sense for 360
// degree wedges.
mergeFaces false; //true;
// Merge small edges. Fraction of bounding box.
mergeTol 0;

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Attached Images
File Type: png example.png (145.8 KB, 27 views)

Last edited by Wikie; January 31, 2018 at 11:45.
Wikie is offline   Reply With Quote

Old   January 31, 2018, 11:49
Default
  #2
Member
 
Roman Gobitz-Pfeifer
Join Date: Dec 2009
Location: Stuttgart
Posts: 83
Rep Power: 16
Wikie is on a distinguished road
I solved the problem by using patchToFace, faceToCell and setToCellZone as you can see in the code below. Any idea / suggestions how this can be done done in less steps?

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name outletFaceSet;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name outlet;
}
}

{
name outletFaceToCell;
type cellSet;
action new;
source faceToCell;
sourceInfo
{
set outletFaceSet;
option any;
}
}

{
name outletZone;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set outletFaceToCell;
}
}

);
// ************************************************** *********************** //
granzer likes this.
Wikie 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



All times are GMT -4. The time now is 11:18.