CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How can i define patch b.c. (inlet) on wall b.c.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2018, 08:57
Default How can i define patch b.c. (inlet) on wall b.c.
  #1
New Member
 
Join Date: Jul 2018
Posts: 6
Rep Power: 7
f.yldz is on a distinguished road
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.
f.yldz is offline   Reply With Quote

Old   July 6, 2018, 07:18
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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.
simrego is offline   Reply With Quote

Old   July 9, 2018, 16:38
Default
  #3
New Member
 
Join Date: Jul 2018
Posts: 6
Rep Power: 7
f.yldz is on a distinguished road
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.
f.yldz is offline   Reply With Quote

Old   July 9, 2018, 16:56
Default
  #4
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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
simrego is offline   Reply With Quote

Old   July 11, 2018, 11:56
Default
  #5
New Member
 
Join Date: Jul 2018
Posts: 6
Rep Power: 7
f.yldz is on a distinguished road
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.
f.yldz is offline   Reply With Quote

Old   July 11, 2018, 14:03
Default
  #6
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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
simrego is offline   Reply With Quote

Old   July 12, 2018, 08:37
Default
  #7
New Member
 
Join Date: Jul 2018
Posts: 6
Rep Power: 7
f.yldz is on a distinguished road
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.
f.yldz is offline   Reply With Quote

Old   July 12, 2018, 08:49
Default
  #8
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14
simrego is on a distinguished road
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.
simrego is offline   Reply With Quote

Old   July 12, 2018, 11:07
Default
  #9
New Member
 
Join Date: Jul 2018
Posts: 6
Rep Power: 7
f.yldz is on a distinguished road
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.
f.yldz is offline   Reply With Quote

Old   July 25, 2018, 21:58
Default
  #10
Member
 
Yousef
Join Date: Feb 2015
Posts: 40
Rep Power: 11
ykanani is on a distinguished road
Quote:
Originally Posted by f.yldz View Post
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.
If your required shape is not available, you will have to create your own. But that requires some basic knowledge of how to modify and compile libraries in openfoam (there are lots of available tutorials if you google that you can learn from).

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;
            }
                    }

    }
For example, the source code to select cell inside a cylinder:
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);

            }
        }
    }
which practically identifies whether the cell center is inside the defined cylinder or not. I hope this helps.

Last edited by ykanani; July 26, 2018 at 11:04.
ykanani is offline   Reply With Quote

Old   July 26, 2018, 17:18
Default
  #11
New Member
 
Join Date: Jul 2018
Posts: 6
Rep Power: 7
f.yldz is on a distinguished road
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.
f.yldz is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
[blockMesh] Cyclic BC's: Possible face ordering problem? (Channel flow) sega OpenFOAM Meshing & Mesh Conversion 3 September 28, 2010 12:46
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 02:34
AMG versus ICCG msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 15:15


All times are GMT -4. The time now is 05:59.