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

Parabolic Boundary Condition in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 27, 2012, 09:45
Default Parabolic Boundary Condition in OpenFOAM
  #1
New Member
 
RAHUL JOSHI
Join Date: Jun 2012
Location: MUMBAI,INDIA
Posts: 17
Rep Power: 5
RAUL is on a distinguished road
How to give a fully developed flow inlet boundary condition (parabolic) in OpenFOAM.??
RAUL is offline   Reply With Quote

Old   June 27, 2012, 15:39
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings RAUL and welcome to the forum!

There are several ways to do it:
  • Check the tutorial "tutorials/incompressible/simpleFoam/pitzDailyExptInlet", where it shows how to define the values for each point in the inlet... defined in the file "constant/boundaryData/inlet/0/U"
  • You can also use groovyBC: http://openfoamwiki.net/index.php/Contrib_groovyBC
  • You can also search this forum for the words "parabolic velocity"
Best regards,
Bruno
babakflame and mgg like this.
wyldckat is offline   Reply With Quote

Old   July 2, 2012, 05:23
Default
  #3
New Member
 
RAHUL JOSHI
Join Date: Jun 2012
Location: MUMBAI,INDIA
Posts: 17
Rep Power: 5
RAUL is on a distinguished road
I tried compiling the boundary condition for parabolicinlet velocity but i am getting an error after doing the compilation.This is the error output:

Making dependency list for source file simpleFoam.C
could not open file parabolicVelocityFvPatchVectorField.H for source file simpleFoam.C
make: *** No rule to make target `parabolicVelocityFvPatchVectorField.dep', needed by `Make/linuxGccDPOpt/dependencies'. Stop.
RAUL is offline   Reply With Quote

Old   July 2, 2012, 07:35
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Without a full description of the changes you've made, or the source code with the changes you've made, all that's left is a guessing game
wyldckat is offline   Reply With Quote

Old   July 2, 2012, 07:39
Default
  #5
New Member
 
RAHUL JOSHI
Join Date: Jun 2012
Location: MUMBAI,INDIA
Posts: 17
Rep Power: 5
RAUL is on a distinguished road
Really sorry for that ,i used a pdf of chalmers university explaining the implementation of this boundary condition.
Can i have your email id so i can send it over to you.
RAUL is offline   Reply With Quote

Old   July 2, 2012, 07:52
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
No need for emails

You can indicate the title and/or name of the PDF you're following, which should be already available online!

Additionally, you can zip the folder you've tried to compile, after you run these two commands:
Code:
wclean
wclean libso
wyldckat is offline   Reply With Quote

Old   July 2, 2012, 07:57
Default
  #7
New Member
 
RAHUL JOSHI
Join Date: Jun 2012
Location: MUMBAI,INDIA
Posts: 17
Rep Power: 5
RAUL is on a distinguished road
Ok
The name of the pdf was "implementBoundaryCondition.pdf" by Mr.Hakan Nilsson.
RAUL is offline   Reply With Quote

Old   July 2, 2012, 08:09
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
OK, it's this one: http://www.tfd.chalmers.se/~hani/kur...yCondition.pdf

Use the instructions starting from page 178. It's easier to follow the instructions from that page forward!
JR22 likes this.
wyldckat is offline   Reply With Quote

Old   July 2, 2012, 08:12
Default
  #9
New Member
 
RAHUL JOSHI
Join Date: Jun 2012
Location: MUMBAI,INDIA
Posts: 17
Rep Power: 5
RAUL is on a distinguished road
Yes it was the same pdf.
I will try compiling from page 178 and would let you know the results.
RAUL is offline   Reply With Quote

Old   October 4, 2013, 09:59
Default
  #10
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings RAUL and welcome to the forum!

There are several ways to do it:
  • Check the tutorial "tutorials/incompressible/simpleFoam/pitzDailyExptInlet", where it shows how to define the values for each point in the inlet... defined in the file "constant/boundaryData/inlet/0/U"
  • You can also use groovyBC: http://openfoamwiki.net/index.php/Contrib_groovyBC
  • You can also search this forum for the words "parabolic velocity"
Best regards,
Bruno
Dear wyldckat,
I saw your post about the options of getting parabolic BC. For the second option, the groovy one... does it work with OF 2.1.1, does it need any compiling or compatible tools to make it works. Could you please direct my how to start using it...
Best Wishes,
Sandy,
sandy13 is offline   Reply With Quote

Old   October 5, 2013, 02:46
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Sandy,

  1. It should work on OpenFOAM 2.1.1.
  2. You will need to build swak4Foam, as instructed here: http://openfoamwiki.net/index.php/Co...4Foam#Building
  3. You can download it as instructed here: http://openfoamwiki.net/index.php/Co...am#Downloading
  4. You need to first install the packages indicated in the section "System Requirements" described here: http://www.openfoam.org/download/source.php
  5. As for how to groovyBC for this flow profile, use Google to search for:
    Code:
    site:cfd-online.com parabolic groovybc
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 7, 2013, 05:21
Default
  #12
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Sandy,

  1. It should work on OpenFOAM 2.1.1.
  2. You will need to build swak4Foam, as instructed here: http://openfoamwiki.net/index.php/Co...4Foam#Building
  3. You can download it as instructed here: http://openfoamwiki.net/index.php/Co...am#Downloading
  4. You need to first install the packages indicated in the section "System Requirements" described here: http://www.openfoam.org/download/source.php
  5. As for how to groovyBC for this flow profile, use Google to search for:
    Code:
    site:cfd-online.com parabolic groovybc
Best regards,
Bruno
Dear wyldckat,
Thank you very much for your replay. It was really very helpful. I have another question for you If you excuse me... Is there another way to get the parabolic B.C. more easy than this way? I mean like a direct B.C. in OF 2.1.1. to be imposed.
Best Wishes,
Snady,
sandy13 is offline   Reply With Quote

Old   October 7, 2013, 16:06
Default
  #13
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Sandy,

Follow the instructions from this post: Compile boundary condition as a new dynamic library post #10

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   October 9, 2013, 05:28
Default
  #14
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Sandy,

Follow the instructions from this post: Compile boundary condition as a new dynamic library post #10

Best regards,
Bruno
Dear wyldckat,
Thank you very much for your help. I followed the instructions and compiled the code you done it with simpleFoam and It works very well. But does it work with my case of interFoam, 3D. I tried to do it but running blew up with out any results. Could you please tell me what is in the inlet velocity B.C?
n (1 0 0);
y (0 1 0);
in my case I impose inlet from above, so I gave like this: maxValue -2;
2 is the maximum velocity I want. Any Ideas would help...
Sandy,
sandy13 is offline   Reply With Quote

Old   October 13, 2013, 04:55
Default
  #15
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Sandy,

Can you modify and share an OpenFOAM tutorial case to demonstrate what you are trying to do with this boundary condition?

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 23, 2013, 07:56
Default dynamic library linking
  #16
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 4
Sherlock_1812 is on a distinguished road
Hi Bruno,

I have a basic doubt about linking a dynamic library to a solver. If a dynamic library (say libmyBCs) has more than one boundary condition compiled in it (something other than parabolic velocity in this case), will there be an error when my solver uses just one of those two? We include libmyBCs.so in the controlDict and not just parabolicVelocity.

I have two boundary conditions compiled in the library and have a case where my modified solver uses only one of the two. When I tried to run the case i got:
Code:
 dlopen error : /home/srivathsan/OpenFOAM/srivathsan-2.2.2/platforms/linuxGccDPOpt/lib/libmyWork.so: undefined symbol: _ZTVN4Foam35newDirectionMixedFvPatchVectorFieldE
Here newDirectionMixedFvPatchVectorField was the second boundary condition that was not use by this solver. So i guess my question is: Is it okay to have one library where all your user defined BC are compiled and accessible when the solver uses only one or few of those BCs?
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   December 29, 2013, 17:30
Default
  #17
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Srivaths,

It's not necessary to use all boundary conditions from the library in the source code of your solver.

The reported error seems to be another one: the boundary condition you added is not properly coded, to properly load up to the object list of possible boundary conditions. It's only partially coded in and it's missing the necessary hook-ups to the object reference library.

Check the previous instructions to verify if you did all of the necessary steps to create a new boundary condition. Or share your source code, so that I can have a look at it.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 30, 2013, 01:16
Default
  #18
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 4
Sherlock_1812 is on a distinguished road
Hi Bruno,

Thank you for the information. The boundary conditions that I've defined in the myBCs library are newGradient and newDirectionMixed. I've attached the .C files of both the boundary conditions.

In newGradient I have only modified the definition for gradient() from fixedGradient BC and in the newDirectionMixed, the definition of refGrad() from directionMixed BC. Since both my BCs compiled, I thought there might not be any errors with the definition.

Would be glad if you could take a look.
Attached Files
File Type: txt newGradientFvPatchVectorField.txt (4.4 KB, 19 views)
File Type: txt newDirectionMixedFvPatchVectorField.txt (4.5 KB, 10 views)
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Old   December 30, 2013, 08:03
Default
  #19
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Srivaths,

Well, just because a library or application builds, it does not mean it will work as intended

What about the header files? The ones that end with ".H"? They have the other half of this story.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   December 31, 2013, 02:26
Post
  #20
Senior Member
 
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 4
Sherlock_1812 is on a distinguished road
Oh, right. Point noted.

I'm learning by doing, so I was under the assumption it's all okay if it builds/compiles

I've attached the header files.
Attached Files
File Type: h newDirectionMixedFvPatchVectorField.H (5.8 KB, 11 views)
File Type: h newGradientFvPatchVectorField.H (4.8 KB, 8 views)
__________________
Regards,

Srivaths
Sherlock_1812 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ship wave Boundary Condition in OpenFoam keepfit OpenFOAM Running, Solving & CFD 1 May 24, 2012 10:24
asking for Boundary condition in FLUENT Destry FLUENT 0 July 27, 2010 00:55
External Radiation Boundary Condition for Grid Interface CFD XUE FLUENT 0 July 9, 2010 02:53
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 06:49
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


All times are GMT -4. The time now is 13:02.