Parabolic Boundary Condition in OpenFOAM
How to give a fully developed flow inlet boundary condition (parabolic) in OpenFOAM.??
|
Greetings RAUL and welcome to the forum!
There are several ways to do it:
Bruno |
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. |
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 :(
|
Really sorry for that :o ,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. |
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 |
Ok
The name of the pdf was "implementBoundaryCondition.pdf" by Mr.Hakan Nilsson. |
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! |
Yes it was the same pdf.
I will try compiling from page 178 and would let you know the results. :) |
Quote:
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, |
Greetings Sandy,
Bruno |
Quote:
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, |
Hi Sandy,
Follow the instructions from this post: http://www.cfd-online.com/Forums/ope...tml#post446451 post #10 Best regards, Bruno |
Quote:
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, |
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 |
dynamic library linking
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 |
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 |
2 Attachment(s)
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. |
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 |
2 Attachment(s)
Oh, right. Point noted.
I'm learning by doing, so I was under the assumption it's all okay if it builds/compiles :p I've attached the header files. |
All times are GMT -4. The time now is 05:12. |