CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

Unstructured tetrahedral mesh Refinement using REFINEMESH DICT UTILITY.???? POSSIBLE?

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

Like Tree2Likes
  • 2 Post By saddy

Reply
 
LinkBack Thread Tools Display Modes
Old   July 11, 2017, 14:15
Default Unstructured tetrahedral mesh Refinement using REFINEMESH DICT UTILITY.???? POSSIBLE?
  #1
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 102
Rep Power: 3
saddy is on a distinguished road
Hey foamers
i am working on a problem with a cylinder with tetrahedral mesh created in gambit. pic is attached below.
i want to know whether refinement is possible near the wall region, say a circular patch from the walls, can this be done using Refinemesh -dict utility???
plzz helppp
Attached Images
File Type: jpg gunref.jpg (112.0 KB, 15 views)
saddy is offline   Reply With Quote

Old   July 11, 2017, 17:41
Default
  #2
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 102
Rep Power: 3
saddy is on a distinguished road
oh hell yeah its possible just did it.....
saddy is offline   Reply With Quote

Old   July 11, 2017, 17:47
Default Unstructured tetrahedral mesh Refinement using REFINEMESH DICT UTILITY.???? POSSIBLE?
  #3
New Member
 
Thomas
Join Date: Jul 2017
Posts: 5
Rep Power: 2
Tomatenbart is on a distinguished road
Would be nice if you could share it with us. So if someone comes to the same problem, he/she knows what to do.



Sent from my iPhone using CFD Online Forum mobile app
Tomatenbart is offline   Reply With Quote

Old   July 12, 2017, 05:02
Lightbulb
  #4
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 102
Rep Power: 3
saddy is on a distinguished road
actually i have a cylinder
i have to refine the mesh along the circumference
so i created annular to cell in toposetdict
and hybrid structured/unstructured mesh in gambit
then i used use hextopology to cut the cells in all three directions and refined from 0.1 milion cells to 2million cells using refinemesh utility

this is my refinemesh dict


/*--------------------------------*- 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;
location "system";
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

set c0;

coordinateSystem global;

globalCoeffs
{
tan1 (1 0 0);
tan2 (0 1 0);
normal (0 0 1);
}

directions ( tan1 tan2 normal );

useHexTopology yes;

geometricCut no;

writeMesh no;


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



this is my toposetdict
/*--------------------------------*- 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;
location "system";
object topoSetDict.1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
{
name c0;
type cellSet;
action new;
source cylinderAnnulusToCell;
sourceInfo
{
p1 (0 0 0);
outerRadius 0.012;
p2 (0 0 0.144);
innerRadius 0.009;
}
}
);

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

first load your gambit mesh to openfoam using gambittooam3d -scae 0.001 etc..just see the command guys

next run this commands[allrun file ] to read toposetdict and refinemesh

#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

refineMeshByCellSet()
{
while [ $# -ge 1 ]
do
if [ ! -e log.refineMesh.$1 ]
then
echo "Creating cell set for primary zone - $1"
cp system/topoSetDict.$1 system/topoSetDict
topoSet > log.topoSet.$1 2>&1

echo "Refining primary zone - $1"
refineMesh -dict system/refineMeshDict -overwrite \
> log.refineMesh.$1 2>&1
fi
shift
done
}

//restore0Dir

//runApplication blockMesh
refineMeshByCellSet 1 2 3 4 [// 1,2,3,4 depend on no times you want to refine]

//#echo "mapping fields from 2D throttle case"
//#runApplication mapFields ../throttle -sourceTime latestTime



//runApplication decomposePar
//runParallel $(getApplication)
//runApplication reconstructPar

#------------------------------------------------------------------------------#


i have attached the results
this refinement is for all 3 directions
Attached Images
File Type: jpg annualrfinerunrefined.jpg (74.6 KB, 10 views)
File Type: jpg frontref.jpg (89.7 KB, 11 views)
guin and Tomatenbart like this.
saddy is offline   Reply With Quote

Reply

Tags
refinemesh utility

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 30 August 23, 2017 13:25
Disturbance in the mesh after the addition of layers Dorian1504 OpenFOAM Native Meshers: snappyHexMesh and Others 0 June 13, 2017 02:27
SHM problem : KVLCC2 with appendage mesh sc.park OpenFOAM Native Meshers: snappyHexMesh and Others 1 March 13, 2016 14:28
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38
unstructured vs. structured grids Frank Muldoon Main CFD Forum 1 January 5, 1999 11:09


All times are GMT -4. The time now is 00:09.