|
[Sponsors] |
June 3, 2024, 06:56 |
2D problems
|
#1 |
New Member
Join Date: Mar 2024
Posts: 10
Rep Power: 2 |
Hello all,
In OF we see a lot of tutorials using 2D cases (pitzDaily, cavity, etc...), but this problems don't use any internal geometry, like the 3D case of motorBike. In my problem, I want to simulate a tube immersed in a fluid, which due its symmetry I can simulate in 2D, like in the figure below. I was able to do the 3D case, by using snappyHexMesh (like in the motorBike tutorial), but how can I do a similar thing for a 2D case? |
|
June 3, 2024, 07:46 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 695
Rep Power: 12 |
You take either the front or the back face and use this with the extrudeMesh utility with 1 layer to get a pseudo-2d-mesh which OpenFOAM requires. Google for a template extrudeMeshDict file to use.
|
|
June 4, 2024, 04:47 |
|
#3 |
New Member
Join Date: Mar 2024
Posts: 10
Rep Power: 2 |
Thank you, @AtoHM ! I was able to find the extrudeMeshDict template. Unfortunately, OF documentation on extrudeMesh is almost nonexistent, making it hard to figure out what are the commands and what they do. I played around with the template but couldn't figure out a way to achieve what I want.
For instance, I have a blockMesh which creates a CV with a box shape defined by the following vertices for main diagonal: (0.25, 0.25, 0.25), (-0.75, -0.25, -0.25). My tube is positioned at (0,0,0) with its longitudinal axis colinear to x-axis. Do you know what commands could I use to get the extrude mesh to be defined by (0.25, 0.25, 0.005), (-0.75, -0.25, -0.005), which mean the thickness I am extruding is 0.01? The code I am using is the following: extrudeModel linearNormal; thickness 0.01; // used by plane extrusion nLayers 1; expansionRatio 1.0; linearNormalCoeffs { thickness 0.01; } Last edited by ncl94; June 4, 2024 at 04:52. Reason: missed something |
|
June 4, 2024, 06:17 |
|
#4 |
New Member
Join Date: Mar 2024
Posts: 10
Rep Power: 2 |
Also, would you know what is the correct procedure? *Meaning the correct order of steps (e.g blockMesh -> snappyHexMesh -> extrudeMesh)
|
|
June 4, 2024, 11:03 |
|
#5 | |
Senior Member
M
Join Date: Dec 2017
Posts: 695
Rep Power: 12 |
I don't really get that part.
Quote:
Going from your first post with the image, I assume you want to run this "face" as a 2d simulation. The visible surface is "FRONT" the one on the other side is "BACK", this extrudeMeshDict should give the correct result: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object extrudeProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // constructFrom patch; sourceCase "$FOAM_CASE"; sourcePatches (FRONT); exposedPatchName BACK; flipNormals false; extrudeModel linearNormal; nLayers 1; expansionRatio 1.0; linearNormalCoeffs { thickness .01; //extrude 1 cm } mergeFaces false; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // |
||
June 4, 2024, 14:52 |
|
#6 |
New Member
Join Date: Mar 2024
Posts: 10
Rep Power: 2 |
I tried to be a bit formal I guess haha ... but what I meant is that if I do exactly as in the piece of code you posted in your last reply, I won't slice the middle of the mesh, where my tube is, but it will generate a mesh with 0.01 thickness from the FRONT boundary as in your example. I actually need something to do exactly the same thing but with an offset from the sourcePatch. Anyway, I appreciate the help.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Problems with coedge curves and surfaces | tommymoose | ANSYS Meshing & Geometry | 6 | December 1, 2020 11:12 |
[mesh manipulation] Problems with rotational cyclic boundaries | TReviol | OpenFOAM Meshing & Mesh Conversion | 8 | July 11, 2014 03:45 |
[ICEM] Flow channel meshing problems | StefanG | ANSYS Meshing & Geometry | 19 | May 15, 2012 06:44 |
Two-phase air water flow problems by activating Wall Lubrication Force | challenger85 | CFX | 5 | November 5, 2009 05:44 |
Help required to solve Hydraulic related problems | aero | CFX | 0 | October 30, 2006 11:00 |