|
[Sponsors] |
How can i define patch b.c. (inlet) on wall b.c. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 3, 2018, 09:57 |
How can i define patch b.c. (inlet) on wall b.c.
|
#1 |
New Member
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Hi Everyone,
I am new to OpenFOAM. I have mesh file in fluent and i want to optimize the inlet position of the film cooling holes on OpenFOAM. For the problem, i have to make many analyzes with changing the position of the inlet holes and for all cases, i don't want to change the geometry and mesh files from fluent. Here, my question is that how can i define inlet (patch b.c.) on a specific position and with a specific shape on wall b.c. after transfering the fluent mesh data to openfoam without inlet holes. I looked to groovyBC for the solution but i didn't solve the problem. |
|
July 6, 2018, 08:18 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
You can use topoSet and createPatch utility. With topoSet you can select the faces, then with createPatch you can convert them into a different boundary patch. Or with pre defined stl files you can use surfaceToPatch. But since your mesh is given, maybe the patch won't be conform with the mesh. Or you can use snappyHexMesh and generate a new mesh for every case. |
|
July 9, 2018, 17:38 |
|
#3 |
New Member
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Thank you simrego,
I used topoSet and createPatch utility. I solved the problem with using box select in topoSet but i want the selection with a specific shape like circle or ellipse not using box, how can i make this with using topoSet. |
|
July 9, 2018, 17:56 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
There are other primitives, not just searchableBox. I think there are searchableSphere and maybe cone and stuff like these. Try banana method and you will know the possibilities.
Or you can use pre defined stl files. You can find a lot of examples about topoSet here: $FOAM_UTILITIES/mesh/manipulation/topoSet/topoSetDict But if you define the boundaries with stl surfaces, it's easier to use surfaceToPatch |
|
July 11, 2018, 12:56 |
|
#5 |
New Member
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Thanks for the suggestions,
I am beginner and try to solve how i will use topoSet. And where can i find examples about writing pre defined functions on OpenFoam. |
|
July 11, 2018, 15:03 |
|
#6 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
What do you mean under pre defined functions?
For toposet you can find examples in the tutorials. With the following command you will find every tutorial where toposet is used: find $FOAM_TUTORIALS -name topoSetDict |
|
July 12, 2018, 09:37 |
|
#7 |
New Member
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Sorry, i wrote it wrong. I mean pre-defined stl files and defining boundries with stl surfaces. I don't know how i define it to OpenFoam, is there any example, tutorial or other document that you can suggest.
Thanks for your helps. |
|
July 12, 2018, 09:49 |
|
#8 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
stl is a file format. You can export any CAD geometry as stl which will gives you a triangulated surface what openFOAM can use. You can use any CAD software for that.
|
|
July 12, 2018, 12:07 |
|
#9 |
New Member
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Now, i understood what you mean but i already have a geometry file and mesh file in fluent and i want to use it without any changing for all cases because it is too complicated geometry and i don't want to mesh it again and again for all cases.
|
|
July 25, 2018, 22:58 |
|
#10 | |
Member
Yousef
Join Date: Feb 2015
Posts: 40
Rep Power: 11 |
Quote:
The face selection criteria can be easily modified in the code to select faces according to your desired selection. Look at the source code of boxToFace for example: https://github.com/OpenFOAM/OpenFOAM...ce/boxToFace.C Code:
forAll(ctrs, facei) { if (//Put your desired criteria here, ctrs[facei] will be the location of the face center ) { addOrDelete(set, facei, add); break; } } } https://github.com/OpenFOAM/OpenFOAM...linderToCell.C contains this criteria: Code:
forAll(ctrs, celli) { vector d = ctrs[celli] - p1_; scalar magD = d & axis; if ((magD > 0) && (magD < magAxis2)) { scalar d2 = (d & d) - sqr(magD)/magAxis2; if (d2 < rad2) { addOrDelete(set, celli, add); } } } Last edited by ykanani; July 26, 2018 at 12:04. |
||
July 26, 2018, 18:18 |
|
#11 |
New Member
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Thanks Yousef,
I solved the problem with using topoSet and createPatch but i will look that how i can modify the libraries, for my possible future problems. Regards. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
[blockMesh] Cyclic BC's: Possible face ordering problem? (Channel flow) | sega | OpenFOAM Meshing & Mesh Conversion | 3 | September 28, 2010 13:46 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 03:34 |
AMG versus ICCG | msrinath80 | OpenFOAM Running, Solving & CFD | 2 | November 7, 2006 16:15 |