Hi Jose,
it works perfectly
Hi Jose,
it works perfectly. Thank you. regards Johannes |
Hi
I am using OpenFOAM 1.4.1. I did as Bernhard Gschaider said. But got the following error message. Does anyone know what went wrong?. [caelinux@rgdlab1 setParabolicInlet]$ wmake Making dependency list for source file setParabolicInlet.C could not open file fvPatchFieldFields.H for source file setParabolicInlet.C SOURCE=setParabolicInlet.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/caelinux/OpenFOAM/OpenFOAM-1.4.1/src/cfdTools/lnInclude -I/home/caelinux/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/caelinux/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/setParabolicInlet.o setParabolicInlet.C:36:32: error: fvPatchFieldFields.H: No such file or directory setParabolicInlet.C: In function ‘int main(int, char**)’: setParabolicInlet.C:71: error: ‘fvPatchVectorFieldField’ was not declared in this scope setParabolicInlet.C:71: error: ‘Upatches’ was not declared in this scope make: *** [Make/linuxGccDPOpt/setParabolicInlet.o] Error 1 |
Hi all,
I want to create an intersection between a patch and a plane. I've find this part of code and I put some lines but that it doesn't work. // Create a patch set intesecting a plane point pnt(4.5,2,2.25); vector spanwiseDirection(0,0,1); plane pl1(pnt,spanwiseDirection); cuttingPlane cutPlane(mesh.boundaryMesh().findPatchID("mur_bas" ),pl1); const labelList& cutCells = cutPlane.cells(); word setName("someCells"); cellSet currentSet(mesh, setName, cutCells); the error's message is : wallGradU.C: In function âint main(int, char**)â: wallGradU.C:121: error: no matching function for call to âFoam::cuttingPlane::cuttingPlane(Foam::label, Foam::plane&)â /home/users/brugiere/OpenFOAM/OpenFOAM-1.4.1/src/sampling/lnInclude/cuttingPlane.H:142: note: candidates are: Foam::cuttingPlane::cuttingPlane(const Foam::primitiveMesh&, const Foam::plane&, const Foam::labelList&) /home/users/brugiere/OpenFOAM/OpenFOAM-1.4.1/src/sampling/lnInclude/cuttingPlane.H:133: note: Foam::cuttingPlane::cuttingPlane(const Foam::primitiveMesh&, const Foam::plane&) /home/users/brugiere/OpenFOAM/OpenFOAM-1.4.1/src/sampling/lnInclude/cuttingPlane.H:112: note: Foam::cuttingPlane::cuttingPlane(const Foam::plane&) /home/users/brugiere/OpenFOAM/OpenFOAM-1.4.1/src/sampling/lnInclude/cuttingPlane.H:58: note: Foam::cuttingPlane::cuttingPlane(const Foam::cuttingPlane&) make: *** [Make/linux64GccDPOpt/wallGradU.o] Error 1 thank's for your messages Olivier |
nvm................
|
Make setParabolicVelocity work for OF1.5
for those who may still interested in setParabolicVelocity
you should do the following two minor correction to make it work with OF-1.5 scalar maxVel(....args()[2]).. word ... args()[1]); :) Best, Hamed |
Error Setting parabolicVelocity as BC in round Inlet
Hi folks,
I am using OF 1.6 (stable) and have compiled the parabolicVelocity lib. I am having trouble with the simulation as such. It inlet is a 2D pipe in the XY-Plane. The direction of the flow is in Z-Direction with an initial velocity U of 6.6 m/s. The initial "0/U" file looks this way: INJET { type parabolicVelocity; n (0 0 1); y (1 1 0); maxValue 6.6; value uniform (0 0 0); } However, the results I am getting are completely wrong! The U(z) distribution (Z-Plane => X=0 Y=0) at the INJET is not even circular (the INJET is a pipe). On the other hand, the distribution of the U(z) velocity in the Y=0 and X=0, not even not symmetrical but also incoherent. I read on this thread that this code could also be used to set an initial parabolicVelocity profile for a 2D case, if the patch was 2D. This is my case. Any help or any ideas why this might no be working? best regards, |
Anyone using this BC with openFoam 1.6?
|
1 Attachment(s)
Hi Noob,
i have created a "tool" that writes an inlet profile. In my case the inlet is in the x-y-plane, flowdirection is z. You need to modify the equations and also change the name of the inlet. (and pay attention to the flow direction and orientation of your case) Then you compile it with wmake and you need to source it, then you should be able to execute the tool in the directory of your case. I attached the files... regards |
Hi Heavy_User,
Thank you, I will try it out! |
Parabolic Profile and Lift&Drag Forces in OF-1.6
Hi,
I am working on benchmark problem "Flow Around Cylinder" and I am a freshman in OF world. I could obtain preliminary results for my geometry. Nevertheless, the results has to be improved by imposing a parabolic velocity on the inlet patch and the lift and drag forces has to be obtained for a quantitative comparison. My main bottlenecks are 1) How to impose a parabolic profile in OF 1.6. 2) How to obtain lift and drag forces in OF 1.6. Actually, bottleneck 1 is very well described by Bernhard in his several posts and I liked his way of implementation. Nevertheless, his code is good upto OF 1.4.1 (?). It gives following run time error when it's compiled and executed in OF 1.6. //////////////////////////////////////////////////////////////////////////////////// #0 Foam::error::printStack(Foam::Ostream&) in "/home/user/ebayrakt/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/home/user/ebayrakt/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib64/libc.so.6" #3 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/user/ebayrakt/OpenFOAM/ebayrakt-1.6/applications/bin/linux64GccDPOpt/setParabolicInlet" #4 __libc_start_main in "/lib64/libc.so.6" #5 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/user/ebayrakt/OpenFOAM/ebayrakt-1.6/applications/bin/linux64GccDPOpt/setParabolicInlet" Segmentation fault //////////////////////////////////////////////////////////////////////////////////// I tried to debug but it seems it will take ages for me to fix it without external support:). So, any suggestion is greatly appreciated. About bottleneck 2, I've found a thread titled "Forces in v1.6" and I think that it is gonna solve the issue. Cheers, Evren PS: May be, the code is all fine but naming convention or some libraries have been updated and it is just a matter of incompatibility of versions.:confused: |
Hi Evren
Make a search for groovyBC either here on the Forum or on the wiki, and you will find all you need. Best regards, Niels |
Hi Niels,
I'm gonna check it out and post my feedback. Thanks, Evren |
Hi all,
groovyBC seems to be a power tool to modify BCs, nevertheless it requires Bison to be installed. In my case, i just needed to implement parabolic BC at the inlet thus I preferred to follow the suggestions in the openfoamwiki (www.openfoamwiki.net). In wiki, under the title "Sig Turbomachinery / Tutorials", it is explained how to implement a parabolic BC in 2D. It's quite straight forward to modify it for 3D. And, if someone needs in 3D, I can send my source files. Cheers, evren |
I have a problem with a customized 3D parabolic BC. I followed all the steps of the Sig Turbomachinery in wiki, but when i try to run the case, an error occurs. The write function is as follows:
void parabolicVelocityFvPatchVectorField::write(Ostream & os) const { fvPatchVectorField::write(os); os.writeKeyword("maxValue") << maxValue_ << token::END_STATEMENT << nl; os.writeKeyword("n") << n_ << token::END_STATEMENT << nl; os.writeKeyword("y") << y_ << token::END_STATEMENT << nl; os.writeKeyword("freq") << f_ << token::END_STATEMENT << nl; os.writeKeyword("phi") << phi_ << token::END_STATEMENT << nl; writeEntry("value", os); } In the 0/U files, i specify the boundary condition as: inlet { type parabolicVelocity; maxValue 0.452; n (0 0 -1); y (0 0 0); freq 0; phi 0; } And when i run the case, the following error occurs: Cannot find 'value' entry on patch entrada of field U in file "./SmeriglioSilviaP/0/U" which is required to set the values of the generic patch field. (Actual type parabolicVelocity) Please add the 'value' entry to the write function of the user-defined boundary-condition or link the boundary-condition into libfoamUtil.so file: ./SmeriglioSilviaP/0/U::boundaryField::entrada from line 35 to line 40. From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch&, const Field<Type>&, const dictionary&) in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 72. FOAM exiting So, i add in 0/U an entry after phi: value (0 0 0); As is sugested in wiki tutorial, and says: FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type parabolicVelocity) on patch entrada of field U in file "./SmeriglioSilviaP/0/U" You are probably trying to solve for a field with a generic boundary condition. From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 782. FOAM exiting Any ideas? I need help! |
Quote:
libs ("libmyBCs.so"); If you build the dynamic library with another name then you should change "libmyBCs.so" with yours. You can check your own build libraries in this directory: $FOAM_USER_LIBBIN I hope this fixes your problem;) |
Thanks for the reply. Actually, i added that line in the controlDict file. And everything is as should be (or seems to), the fact is that the library libmyBCs.so isn´t anywhere. Should i create it before? i think that adding in the Make/files file in the BC folder this:
parabolicVelocity.......C LIB = $(FOAM_USER_LIBBIN)/libmyBCs Is all i needed to do and that by this, when i compile, it creates the library, is that right? Thanks! |
Quote:
And if you compile the source code as it's described in the wiki page, it should create libmyBC.so in this directory $(FOAM_USER_LIBBIN). Quote:
/////////////////////////////////////////////////// parabolicVelocityFvPatchVectorField.C LIB = $(FOAM_USER_LIBBIN)/libmyBCs /////////////////////////////////////////////////// So libmyBCs will be created in the specified directory. Of course your source file might have another name then, you should write the proper file name. And this should do the work for you. You build the library, you tell the solver where to find this library. So, this should be all... Good luck ;-) Evren |
Thanks very much!!!!!! it seems that there where some errors in the code of the BC that didnt allow the compliation and building to finish succesfully and that caused that the library woudlnt be linked. I could run succesfully now, ill see if it is doing what it was supposed to do.
Thanks! |
general profile inlet bc
Hi
I'm a new OF 1.6 user, I'd like to know how to implement an interpolated inlet velocity profile taken from an external data file. Is this possibility already there in OF 1.6? thanks Quote:
|
hello...all..
i need to prescribe parabolic velocity profile at inlet to a 3-D circular pipe . The pipe is along the x-Axis...ie. x-axis as its centerline. I know the parabolic velocity profile for cylindrical coordinates system but how to implement the same in Cartesian coordinates....i need "u" as a function of x,y,z at inlet. plz help me out... |
Parabolic inlet velocity profile
Hi
I think you can use groovy boundary condition and transform cylindrical cordinate to cartesian. Good luck Ata |
Quote:
i postet a while ago(further up somewhere) a "tool" that should be able to do that. Just download and insert your equation...hope it works.. regards |
setParabolicInlet.C
Hi. Does anyone have setParabolicInlet.C file previously posted? It is not available any more. If anyone can email it to gascortado@gmail.com I will greately appreciate it. Thanks
|
Hi
You would be better off considering the tool swak4foam: http://openfoamwiki.net/index.php/Contrib/swak4Foam Have a nice weekend, Niels |
information in parabolic inlet
Good morning evryone!
I 'm new in OpenFoam ,i want set parabolic inlet.I use the version 1.7.0. my geometry is a canal with attach in a tab.I have read in forom but i don't understand. Please some help me to explain the procedure. I try to english but my language is french. |
Hi
Hi all, can every one tell me how to define U0=1-exp(-y^2) profile at the inlet BCs?
_____ Rasoul |
Quote:
Or you can do it with groovyBC (now part of the swak4Foam-package). You find info about that either inthe Forum or on the Wiki |
Quote:
tanx for your reply, i have not any information about swak4Foam and not have enough time to study it, would you tell me the simplest way to set this BCs at the inlet? (i used OF.1.5-dev) ________ Rasoul |
Quote:
As you're very short on time: http://tinyurl.com/3fklrwd |
Quote:
i successed to set the Bcs that i mentioned in the last posts by using nonuniform BCs. now i wanna to add osscillation to the inlet after reaching to the steady state. i know how to use oscillating bc, but dont know how to set it be continued from previous issue!!!??? on the other hand i wanna set unsteady BCs so that after a special time that the problem reached to the steady state, apply oscillation at the inlet. whoud you tell me how do it?? tanx __________ Rasoul |
can every one tell me how to exert (1-exp(-y^2)+0.5Cos2t) profile at the inlet BCs by groovy BCs?? i did not find any manual for groovyBC so that help me do it, i am very glad if intruduce me any documention a bout it.
_____ Rasoul |
Quote:
(especially points 5&7) |
tnx for your attention, you are right!!!
I've done my work with a combination of two other boundary conditions, without use groovyBC :)) |
Ehhh...there are many examples on the download page of GroovyBC, so it's really a question of *reading* before asking.
|
Quote:
_______ Rasoul |
Hello Håkan
I am going through your tutorial. I am using OpenFoam 2.1. I am a beginner and freshly started learning openFoam. I cannot find parabolicvelocity folder and relevant files in the path. parabolicVelocity/parabolicVelocityFvPatchVectorField.C parabolicVelocity/parabolicVelocityFvPatchVectorField.H Can you please send them at sihaqqi@gmail.com. I shall be very grateful. I have tried to find them on internet but every link is useless. Thanks and Regards |
Quote:
|
Regarding parabolic velocity profile at inlet
Hello!
I am trying to give a parabolic velocity profile at the inlet. I got the default code from Ansys fluent manual, how can I adjust it such as I get a particular velocity at inlet. Initially, I have taken up the code and interpreted and during initialization, I gave the velocity required. Here is the code I used and any suggestions regarding the improvement of the code to get a required velocity?: #include "udf.h" DEFINE_PROFILE(x_velocity,thread,index) { real x[ND_ND]; real y; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); y = x[1]; F_PROFILE(f,thread,index) = 20. - y*y/(.0745*.0745)*20.; } end_f_loop(f,thread) } Regards, Shiva |
All times are GMT -4. The time now is 12:00. |