|
[Sponsors] |
[blockMesh] Arc-edge on wedge-block not possible? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 1, 2012, 06:56 |
Arc-edge on wedge-block not possible?
|
#1 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi,
I have created a mesh which has wedge blocks (blocks with only 6 vertices) but when I define an arc-edge on the wedge it is ignored and not shown in ParaFoam. the edge is shown as straight line. Is it not possible to create arc-edges on wedge-blocks? And if so, is there another possibility to get curved edges on a wedge-block? Thanks in advance, Alexander |
|
August 1, 2012, 08:00 |
|
#2 |
Disabled
Join Date: Mar 2011
Posts: 174
Rep Power: 15 |
It is definitely possible, I have done that.
Can you post your blockMesh? |
|
August 2, 2012, 04:39 |
|
#3 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
I have j wedges and on the two edges which are opposite to the vertices that fall together I define an arc like : arc <vertex1> <vertex2> <interpolationpoint koordinates>.
I have this problem an all my wedges in my code. @anon_a: Today I am working on another machine unfortantly I have no access to my blockMeshDict-file. Mybe for wedges there is another command than arc ... ... ... to define arcs? Regards, Alex |
|
August 2, 2012, 06:21 |
|
#4 |
Disabled
Join Date: Mar 2011
Posts: 174
Rep Power: 15 |
An example blockMeshDict.m4 is attached.
Use Code:
m4 blockMeshDict.m4 > constant/polyMesh/blockMeshDict I hope this is what you were looking for. EDIT: something was wrong with uploading the file, I finally had to rename it to blockMeshDict.txt |
|
January 20, 2013, 13:54 |
|
#5 | |
Member
Jamal
Join Date: May 2012
Location: Freiburg
Posts: 54
Rep Power: 12 |
Dear
I am trying to create edges in the following blockMeshDict file which creates a simple hex block (cavity tutorial). As stated in the user guide that the edges option arc produces the circular arc with single interpolation point but its not working in my case. Please let me know how to handle this. Quote:
Jamal |
||
January 21, 2013, 03:27 |
|
#6 |
Member
Alexander A
Join Date: Jun 2012
Posts: 53
Rep Power: 13 |
Hi aujamal20,
Just increase simple greading to (2 2 2) and you will get the circular edges. Best, Alex |
|
January 21, 2013, 03:38 |
|
#7 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18 |
In my opinion the grading shouldn't be a problem.
It would be interesting to know the error message to see what is wrong. If the error message give something like: Foam Fatal Error Keyword: 'blocks' undefined I would try to place the keyword edges and appendages below the keyword blocks. However if he normally compiles the mesh without errors I would increase the number of cells on each edge (replace the (1 1 1 ) before the word simpleGrading with (10 10 10) or something like that), otherwise the mesh cannot calculate the arc, for no interpolation points are given. I hope I could contribute regards Colin |
|
January 21, 2013, 04:22 |
|
#8 | |||
Member
Jamal
Join Date: May 2012
Location: Freiburg
Posts: 54
Rep Power: 12 |
Dear
It compiles normally with out giving any error. But this time I put edges next to blocks and if I increase the number of cells from (1 1 1) to (2 2 2) it will draw straight lines from the interpolation point to opposite vertices while I expect to have a circular arc through that interpolation point. Quote:
Quote:
Quote:
jamal Last edited by aujamal20; January 21, 2013 at 04:51. |
||||
January 21, 2013, 04:38 |
|
#9 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18 |
Hm in the above mentioned post there is no explicit question
and the information still is very limited. You might want to provide a picture which illustrates your problem. On the other hand I want you to redirect you to my previous post, where I stated that the number of cells per edge is somehow related to the display of certain edge types. regards |
|
January 21, 2013, 04:44 |
|
#10 | |||
Member
Jamal
Join Date: May 2012
Location: Freiburg
Posts: 54
Rep Power: 12 |
Dear
I am trying to ask that in the first figure I have Quote:
then I increase the number of cells in x1 & x2 direction and it create linear lines joining interpolation point to opposite vertices rather than an circular arc. I think it should produce an arc at this point or not??? Quote:
Quote:
Thanks Last edited by aujamal20; January 21, 2013 at 07:35. |
||||
January 21, 2013, 08:12 |
|
#11 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 18 |
I don't know what you are complaining about,
the last picture looks really nice! The other pictures: You only show the outline which is a simplified representation of the geometry, which only shows the outer extends, but not the real geometry. So the results are hardly comparable. You should also print the surface of the to see what is really going on. But even then I guess your geometry won't look like a circle, for you are using to few cells. However to complete the understanding of blockMesh: Each cell has straight edges (somebody may correct me if I'm wrong), so If you define an arc with one cell (1 1 1) then it still will be a square. In order to get your block, arc shaped you have to use more cells, which will align to the previous defined circle! So this is why your pictures look more and more like a circle. |
|
January 21, 2013, 11:34 |
|
#12 |
Member
Jamal
Join Date: May 2012
Location: Freiburg
Posts: 54
Rep Power: 12 |
Dear colinB
Thanks for your patience and responses on my inquries. Actually what I was thinking was that by using an arc option in edges, a geometry with circular edges could be created even with one cell . And as u told that each cell has straight edges and to have circular edge i need to define more cells. Now i get the idea. Onec again thanks alot...... Regards Jamal |
|
March 5, 2013, 20:45 |
|
#13 |
Member
yu
Join Date: Nov 2010
Posts: 39
Rep Power: 15 |
If the angle is small, the line may look like a straight line. Yes, you can do it with arc. google OpenFoam pipe flow tutorial, there is a nice example of wedge (2D-axis symmetric) made by blockMesh.
|
|
October 4, 2022, 17:13 |
|
#14 |
New Member
Join Date: Sep 2022
Posts: 6
Rep Power: 3 |
I am trying to make a 2D axisymmteric wedge with a sine wavy wall on the bottom. However, it always complains about "front" and "back" are not planar (which is wedged surface) as shown below:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // scale 0.001; n 100; //power a 0.15; //ridge amplitude lambda 4; //wavelength of ridge halfAngle 2.5; //half angle of wedge in degrees offset 90; maxX #eval{ $lambda*cos(degToRad($halfAngle)) }; //vertices 1,4 x-coordinates maxY #eval{ $lambda*sin(degToRad($halfAngle)) }; //vertices 1,4 y-coordinates abs minZ #calc "$a*Foam::pow(sin($lambda/$lambda + degToRad($offset)), $n)"; //interpolation points x-y-z coordinates r0 0; z0 #calc "$a*Foam::pow(sin($r0/$lambda + degToRad($offset)), $n)"; r1 0.1; x1 #calc "$r1*cos(degToRad($halfAngle))"; y1 #calc "$r1*sin(degToRad($halfAngle))"; z1 #calc "$a*Foam::pow(sin($r1/$lambda + degToRad($offset)), $n)"; r2 0.2; x2 #calc "$r2*cos(degToRad($halfAngle))"; y2 #calc "$r2*sin(degToRad($halfAngle))"; z2 #calc "$a*Foam::pow(sin($r2/$lambda + degToRad($offset)), $n)"; r3 0.3; x3 #calc "$r3*cos(degToRad($halfAngle))"; y3 #calc "$r3*sin(degToRad($halfAngle))"; z3 #calc "$a*Foam::pow(sin($r3/$lambda + degToRad($offset)), $n)"; r4 0.4; x4 #calc "$r4*cos(degToRad($halfAngle))"; y4 #calc "$r4*sin(degToRad($halfAngle))"; z4 #calc "$a*Foam::pow(sin($r4/$lambda + degToRad($offset)), $n)"; r5 0.5; x5 #calc "$r5*cos(degToRad($halfAngle))"; y5 #calc "$r5*sin(degToRad($halfAngle))"; z5 #calc "$a*Foam::pow(sin($r5/$lambda + degToRad($offset)), $n)"; r6 0.6; x6 #calc "$r6*cos(degToRad($halfAngle))"; y6 #calc "$r6*sin(degToRad($halfAngle))"; z6 #calc "$a*Foam::pow(sin($r6/$lambda + degToRad($offset)), $n)"; r7 0.7; x7 #calc "$r7*cos(degToRad($halfAngle))"; y7 #calc "$r7*sin(degToRad($halfAngle))"; z7 #calc "$a*Foam::pow(sin($r7/$lambda + degToRad($offset)), $n)"; r8 0.8; x8 #calc "$r8*cos(degToRad($halfAngle))"; y8 #calc "$r8*sin(degToRad($halfAngle))"; z8 #calc "$a*Foam::pow(sin($r8/$lambda + degToRad($offset)), $n)"; r9 0.9; x9 #calc "$r9*cos(degToRad($halfAngle))"; y9 #calc "$r9*sin(degToRad($halfAngle))"; z9 #calc "$a*Foam::pow(sin($r9/$lambda + degToRad($offset)), $n)"; r10 1.0; x10 #calc "$r10*cos(degToRad($halfAngle))"; y10 #calc "$r10*sin(degToRad($halfAngle))"; z10 #calc "$a*Foam::pow(sin($r10/$lambda + degToRad($offset)), $n)"; r11 1.1; x11 #calc "$r11*cos(degToRad($halfAngle))"; y11 #calc "$r11*sin(degToRad($halfAngle))"; z11 #calc "$a*Foam::pow(sin($r11/$lambda + degToRad($offset)), $n)"; r12 1.2; x12 #calc "$r12*cos(degToRad($halfAngle))"; y12 #calc "$r12*sin(degToRad($halfAngle))"; z12 #calc "$a*Foam::pow(sin($r12/$lambda + degToRad($offset)), $n)"; r13 1.3; x13 #calc "$r13*cos(degToRad($halfAngle))"; y13 #calc "$r13*sin(degToRad($halfAngle))"; z13 #calc "$a*Foam::pow(sin($r13/$lambda + degToRad($offset)), $n)"; r14 1.4; x14 #calc "$r14*cos(degToRad($halfAngle))"; y14 #calc "$r14*sin(degToRad($halfAngle))"; z14 #calc "$a*Foam::pow(sin($r14/$lambda + degToRad($offset)), $n)"; r15 1.5; x15 #calc "$r15*cos(degToRad($halfAngle))"; y15 #calc "$r15*sin(degToRad($halfAngle))"; z15 #calc "$a*Foam::pow(sin($r15/$lambda + degToRad($offset)), $n)"; vertices ( (0 0 $z0) //0 ($maxX $maxY $minZ) //1 ($maxX $maxY 4) //2 (0 0 4) //3 ($maxX #eval{-1*$maxY} $minZ) //4 ($maxX #eval{-1*$maxY} 4) //5 /*($x15 #eval{-1*$y15} $z15) //6 ($maxX #eval{-1*$maxY} 0) //7 ($maxX #eval{-1*$maxY} 4) //8 ($x15 #eval{-1*$y15} 4) //9*/ //(1 1 0.1) //(0 1 0.1) ); blocks ( hex (0 4 1 0 3 5 2 3) (100 1 100) simpleGrading (1 1 10) //hex (1 6 7 2 4 9 8 3) (20 1 100) simpleGrading (1 1 10) /*hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1)*/ ); edges ( spline 0 1 ( (0 0 $z0) ($x1 $y1 $z1)//($x1 $y1 0.145380) ($x2 $y2 $z2)//($x2 $y2 0.132370) ($x3 $y3 $z3)//($x3 $y3 0.113200) ($x4 $y4 $z4)//($x4 $y4 0.090900) ($x5 $y5 $z5)//($x5 $y5 0.068540) ($x6 $y6 $z6)//($x6 $y6 0.048490) ($x7 $y7 $z7)//($x7 $y7 0.032190) ($x8 $y8 $z8)//($x8 $y8 0.020030) ($x9 $y9 $z9)//($x9 $y9 0.011680) ($x10 $y10 $z10)//($x10 $y10 0.006380) ($x11 $y11 $z11) ($x12 $y12 $z12) ($x13 $y13 $z13) ($x14 $y14 $z14) ($x15 $y15 $z15) ($maxX $maxY $minZ) ) spline 0 4 ( (0 0 $z0) ($x1 #eval{-1*$y1} $z1) ($x2 #eval{-1*$y2} $z2) ($x3 #eval{-1*$y3} $z3) ($x4 #eval{-1*$y4} $z4) ($x5 #eval{-1*$y5} $z5) ($x6 #eval{-1*$y6} $z6) ($x7 #eval{-1*$y7} $z7) ($x8 #eval{-1*$y8} $z8) ($x9 #eval{-1*$y9} $z9) ($x10 #eval{-1*$y10} $z10) ($x11 #eval{-1*$y11} $z11) ($x12 #eval{-1*$y12} $z12) ($x13 #eval{-1*$y13} $z13) ($x14 #eval{-1*$y14} $z14) ($x15 #eval{-1*$y15} $z15) ($maxX #eval{-1*$maxY} $minZ) ) ); boundary ( /*leftWall { type wall; faces ( (0 12 16 4) (4 16 20 8) ); } rightWall { type wall; faces ( (7 19 15 3) (11 23 19 7) ); }*/ lowerWall { type wall; faces ( (0 4 1 0) //(1 6 7 2) /* (1 5 17 13) (5 6 18 17) (2 14 18 6) (2 3 15 14)*/ ); } atmosphere { type patch; faces ( (3 5 2 3) (1 4 5 2) //(2 7 8 3) /*(10 22 23 11)*/ ); } axis { type empty;//symmetry; faces ( (0 3 3 0) ); } front { type wedge; faces ( (0 1 2 3) //(1 2 3 4) ); } back { type wedge; faces ( (0 3 5 4) //(6 9 8 7) ); } ); mergePatchPairs ( ); // ************************************************************************* // Code:
At local face at (0.00397657155847 -0.000173620863786 0.0038483950209) the normal (-0.0436193873652 -0.999048221582 5.14791664087e-16) differs from the average normal (-0.0422759102345 -0.968277536357 3.2650380694e-14) by 0.000948640000007 Either correct the patch or split it into planar parts --> FOAM Warning : From virtual void Foam::wedgePolyPatch::calcGeometry(Foam::PstreamBuffers&) in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 72 Wedge patch 'back' is not planar. At local face at (0.00397633256136 -0.000173610428947 0.00394914458547) the normal (-0.0436193873652 -0.999048221582 1.55291125028e-16) differs from the average normal (-0.0422759102345 -0.968277536357 3.2650380694e-14) by 0.000948640000007 Either correct the patch or split it into planar parts There are no merge patch pairs Writing polyMesh with 0 cellZones ---------------- Mesh Information ---------------- boundingBox: (0 -0.000174477549461 2.75279175495e-31) (0.00399619288633 0.000174477549461 0.004) nPoints: 20402 nCells: 10000 nFaces: 40200 nInternalFaces: 19800 ---------------- Patches ---------------- patch 0 (start: 19800 size: 100) name: lowerWall patch 1 (start: 19900 size: 200) name: atmosphere patch 2 (start: 20100 size: 100) name: axis patch 3 (start: 20200 size: 10000) name: front patch 4 (start: 30200 size: 10000) name: back End Thanks a lot, Chris |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
[Other] mergeMatchPairs with arcs | vainilreb | OpenFOAM Meshing & Mesh Conversion | 1 | August 5, 2013 08:11 |
[blockMesh] apparently the mesh doesn't want to be created in one direction | Maxime Thomas | OpenFOAM Meshing & Mesh Conversion | 1 | August 18, 2012 06:05 |
[Commercial meshers] Icem Mesh to Foam | jphandrigan | OpenFOAM Meshing & Mesh Conversion | 4 | March 9, 2010 02:58 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |