|
[Sponsors] |
[blockMesh] could anyone post a simple cylinder mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 8, 2020, 12:42 |
|
#41 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 |
Quote:
mm from what i have read about the subject, in OpenFOAM the cylinder is created from adding an arc section to a square section. but from your post: i do not get why you need this ? (are you trying to simulate a 2D simulation?) at least from what i know in of doing a cylinder with only separation in the axis, would not be possible...but i insist that i can not imagine why you would like to do that (i am new to CFD so maybe i am not following you..) maybe if you explain me a little bit more i could help you more best regards. |
||
May 8, 2020, 14:02 |
|
#42 |
New Member
Join Date: May 2020
Posts: 3
Rep Power: 6 |
Hi Otaolafr,
Thank you for your answer! I try to do this because I need a cylinder mesh for simulations with an other program. In this other program the simulation time is very long if I have so many cells - maybe there is a way to connect the cells on the round basement? And beside of that I need to be able to fix the initial parameters of the cells on one side of the cylinder and I can't fix so many... Also I have researched whether there is a possibility to connect all cells of the grid to one cell but so far I do not think that works ...Maybe you have an idea? I would be very grateful! |
|
May 8, 2020, 15:50 |
|
#43 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 6 |
Quote:
|
||
May 8, 2020, 16:20 |
|
#44 |
New Member
Join Date: May 2020
Posts: 3
Rep Power: 6 |
Oh I'm sorry, I don't need a cylinder with just one cell. I just thought that maybe there is a command that can unify all of them, that would solve the problem of having so many. Having a mesh with 5 cells would be alright... What I need is a cylinder that has just one cell in the round basement and not thousands like in the picture of the mesh I posted. And additionally it would be perfect if the mesh would only be discretized in one direction - that is all I want ☺️ but I think that is to much wanted! 😐
|
|
May 9, 2020, 10:19 |
|
#45 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Following alternative may be of interest for some visitors of this thread:
Simple cylindrical geometry: example using blockMesh PS: IMHO the proposed whole-cylinder with inner wedged elements may lead to numerical troubles along the axis... Therefore I'd rather recommend to use hex-elements whenever possible. Most algorithms will behave more gracefully! |
|
May 9, 2020, 10:51 |
|
#46 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
I once found the following relevant script from Ehsan Madadi, might be useful for some of you to generate cylinder meshes with OpenFOAM:
https://www.ehsanmadadi.com/cylinder-mesh/
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
October 23, 2020, 18:18 |
|
#47 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
A simple example
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; pri 0.20; // positiv inner radius pxm 0.12; // postiv x value for smooth transition on inner rectangle pra 0.325; // positve outer radius nxm #neg $pxm; // #neg only works in foundation version nri #neg $pri; // #neg only works in foundation version nra #neg $pra; // #neg only works in foundation version leA 0.785; // upper z value leB 0.0; // lower z value pa 25; // number of cells in angle phi direction(per block) or 4*pa around circumference. inner rectangle pa*pa ra 10; // number of cells in radial direction za 50; // number of cells along the height vertices ( name i0 (0 $nri $leA) name i1 ($pri 0 $leA) name i2 (0 $pri $leA) name i3 ($nri 0 $leA) name a0 (0 $nra $leA) name a1 ($pra 0 $leA) name a2 (0 $pra $leA) name a3 ($nra 0 $leA) name I0 (0 $nri $leB) name I1 ($pri 0 $leB) name I2 (0 $pri $leB) name I3 ($nri 0 $leB) name A0 (0 $nra $leB) name A1 ($pra 0 $leB) name A2 (0 $pra $leB) name A3 ($nra 0 $leB) ); blocks ( hex (i3 i2 i1 i0 I3 I2 I1 I0) myCellZone ($pa $pa $za) simpleGrading (1 1 1) hex (i0 i1 a1 a0 I0 I1 A1 A0) myCellZone ($pa $ra $za) simpleGrading (1 1 1) hex (i1 i2 a2 a1 I1 I2 A2 A1) myCellZone ($pa $ra $za) simpleGrading (1 1 1) hex (i2 i3 a3 a2 I2 I3 A3 A2) myCellZone ($pa $ra $za) simpleGrading (1 1 1) hex (i3 i0 a0 a3 I3 I0 A0 A3) myCellZone ($pa $ra $za) simpleGrading (1 1 1) ); edges ( spline i0 i1 (($pxm $nxm $leA)) # spline on inner square to round it for improved mesh quality spline i1 i2 (($pxm $pxm $leA)) spline i2 i3 (($nxm $pxm $leA)) spline i3 i0 (($nxm $nxm $leA)) spline I0 I1 (($pxm $nxm $leB)) spline I1 I2 (($pxm $pxm $leB)) spline I2 I3 (($nxm $pxm $leB)) spline I3 I0 (($nxm $nxm $leB)) arc a0 a1 90 (0 0 1) # works in the foundation version arc a1 a2 90 (0 0 1) arc a2 a3 90 (0 0 1) arc a3 a0 90 (0 0 1) arc A0 A1 90 (0 0 1) arc A1 A2 90 (0 0 1) arc A2 A3 90 (0 0 1) arc A3 A0 90 (0 0 1) ); defaultPatch { name allBoundary; type wall; } boundary ( ); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
Prescribed Translating Cylinder Mesh for Added Mass Problem (Transient FSI) | Lloyd Sullivan | CFX | 5 | August 7, 2018 09:11 |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
[ICEM] How to mesh for regular pentagonal cylinder using ICEM in 2D? | ranjanrk | ANSYS Meshing & Geometry | 0 | June 18, 2016 03:10 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |