|
[Sponsors] |
[blockMesh] Cylindrical mesh with an odd number of circumferential cells |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 14, 2015, 09:37 |
Cylindrical mesh with an odd number of circumferential cells
|
#1 |
New Member
Gregor Neuber
Join Date: Dec 2012
Posts: 2
Rep Power: 0 |
Hello everyone,
I want to create a cylindrical mesh with an odd number of equidistant distributed circumferential cells, to be more precise there must be 17 of them. I tried a lot but did not get a solution, for example: i) with one block, but you'll end up by ether an block inconsistency error or an arc definition error "Invalid arc definition - are the points co-linear? Denom =0" ii) two blocks, but since the face numbers between these blocks are different at the centerline, I get also an error message. Is there an intelligent way to do it? It looks like a very easy problem, but I can not get a solution. Thanks for any help! Regards, Gregor |
|
April 16, 2015, 04:21 |
|
#2 |
New Member
Gregor Neuber
Join Date: Dec 2012
Posts: 2
Rep Power: 0 |
Here is one solution, which is definitely not very elegant:
Code:
/*--------------------------------*- C++ -*-------------------------------------*\ * | ========= | | * | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | * | \\ / O peration | Version: 1.7.1 | * | \\ / A nd | Web: www.OpenFOAM.com | * | \\/ M anipulation | | * \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; pi 3.141592653589793; rad #calc "2.0*$pi/360.0"; D 0.005; nCircumveratialCells 17; // positions * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // inlet 0.0; outlet #calc "40*$pi*$D"; domain #calc "12*$pi*$D"; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // alpha1 #calc "360/$nCircumveratialCells*$rad"; alpha2 #calc "$alpha1+($nCircumveratialCells-1)/2*360/$nCircumveratialCells*$rad"; alpha3 #calc "$alpha2+($nCircumveratialCells-1)/2*360/$nCircumveratialCells*$rad"; domainx1 #calc "$domain*cos($alpha1)"; domainy1 #calc "$domain*sin($alpha1)"; domainx2 #calc "$domain*cos($alpha2)"; domainy2 #calc "$domain*sin($alpha2)"; domainx3 #calc "$domain*cos($alpha3)"; domainy3 #calc "$domain*sin($alpha3)"; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // vertices ( ($domainx1 $domainy1 $inlet) // 0 ($domainx2 $domainy2 $inlet) // 1 ($domainx3 $domainy3 $inlet) // 2 ($domainx1 $domainy1 $outlet) // 3 ($domainx2 $domainy2 $outlet) // 4 ($domainx3 $domainy3 $outlet) // 5 (0.0 0.0 $inlet) // 6 (0.0 0.0 $outlet) // 7 ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // nCircumveratialPoints1 #calc "($nCircumveratialCells-1)/2"; nCircumveratialPoints2 #calc "$nCircumveratialPoints1"; nCircumveratialPoints3 1; // radial resolution nRadialPoints 10; sRadialInlet 0.1; sRadialOutlet 1; // axial resolution nDomain 32; sDomain 7.544161191700337; blocks ( // nozzle hex ( 0 1 6 6 3 4 7 7) ($nCircumveratialPoints1 $nRadialPoints $nDomain) edgeGrading (1 1 1 1 $sRadialInlet $sRadialInlet $sRadialOutlet $sRadialOutlet $sDomain $sDomain $sDomain $sDomain) hex ( 1 2 6 6 4 5 7 7) ($nCircumveratialPoints2 $nRadialPoints $nDomain) edgeGrading (1 1 1 1 $sRadialInlet $sRadialInlet $sRadialOutlet $sRadialOutlet $sDomain $sDomain $sDomain $sDomain) hex ( 2 0 6 6 5 3 7 7) ($nCircumveratialPoints3 $nRadialPoints $nDomain) edgeGrading (1 1 1 1 $sRadialInlet $sRadialInlet $sRadialOutlet $sRadialOutlet $sDomain $sDomain $sDomain $sDomain) ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // beta1 #calc "360/$nCircumveratialCells*$rad+$rad"; beta2 #calc "3/2*$beta1+($nCircumveratialCells-1)/2*360/$nCircumveratialCells*$rad"; beta3 #calc "$beta2+($nCircumveratialCells-1)/2*360/$nCircumveratialCells*$rad"; // domain circDomainx1 #calc "$domain*cos($beta1)"; circDomainy1 #calc "$domain*sin($beta1)"; circDomainx2 #calc "$domain*cos($beta2)"; circDomainy2 #calc "$domain*sin($beta2)"; circDomainx3 #calc "$domain*cos($beta3)"; circDomainy3 #calc "$domain*sin($beta3)"; edges ( arc 0 1 ($circDomainx1 $circDomainy1 $inlet) arc 1 2 ($circDomainx2 $circDomainy2 $inlet) arc 2 0 ($circDomainx3 $circDomainy3 $inlet) arc 3 4 ($circDomainx1 $circDomainy1 $outlet) arc 4 5 ($circDomainx2 $circDomainy2 $outlet) arc 5 3 ($circDomainx3 $circDomainy3 $outlet) ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // boundary ( inletJet { type patch; physicalType noParticleOutflow; faces ( ( 0 1 6 6) ( 1 2 6 6) ( 2 0 6 6) ); } outlet { type patch; physicalType particleOutflow; faces ( ( 3 4 7 7) ( 4 5 7 7) ( 5 3 7 7) ); } side { type patch; physicalType noParticleOutflow; faces ( (0 3 4 1) (1 4 5 2) (2 5 3 0) ); } ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Does anyone have an idea on a more elegant version? Best regards, Gregor |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh running killed! | Mark JIN | OpenFOAM Meshing & Mesh Conversion | 7 | June 14, 2022 01:37 |
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops | avinashjagdale | OpenFOAM Meshing & Mesh Conversion | 53 | March 8, 2019 09:42 |
[Other] Equal decomposition of cylindrical fluid domain | Sean95 | OpenFOAM Meshing & Mesh Conversion | 3 | February 12, 2019 03:34 |
SigFpe when running ANY application in parallel | Pj. | OpenFOAM Running, Solving & CFD | 3 | April 23, 2015 14:53 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |