|
[Sponsors] |
January 22, 2009, 16:58 |
Jose,
Thanks for your sugge
|
#101 |
New Member
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Jose,
Thanks for your suggestion. It worked! I am now trying to see how to specify profiles at multiple inputs. I am using the following code but it does not compile. Any suggestions? I am using this in the include file that I include in the solver. Thanks, Sesha fvPatchVectorFieldField& Upatches = U.boundaryField(); forAll(Upatches, inletPatchID) { if ((typeid(Upatches[inletPatchID]) == mesh.boundaryMesh().findPatchID("inlet"))) { // Get reference to boundary value, patch centers fvPatchVectorField& inletU =U.boundaryField()[inletPatchID]; const fvsPatchVectorField& inletFaceCentres = mesh.Cf().boundaryField()[inletPatchID]; scalarField y = inletFaceCentres.component(vector::Y); forAll(y, counter) { if(y[counter] >= 0.02) { inletU[counter] = 0.05*(y[counter]-0.02)*vector(1,0,0); //0.1*(y[counter]-0.02)*vector(1,0,0); } else { inletU[counter] = 0.0*vector(1,0,0); //0.1*y[counter]*vector(1,0,0); } } U.write(); } } |
|
January 23, 2009, 10:00 |
Thanks for the tip Jose. I wil
|
#102 |
New Member
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Thanks for the tip Jose. I will let you know once I have tried it.
Thanks, Sesha |
|
January 23, 2009, 12:24 |
Ok, I have tried the sugestion
|
#103 |
New Member
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Ok, I have tried the sugestion above and it gives me the same error as before:
In file included from my_interFoam.C:61: MultipleInletVelocityProfile.H: In function 'int main(int, char**)': MultipleInletVelocityProfile.H:5: error: 'fvPatchVectorFieldField' was not declared in this scope MultipleInletVelocityProfile.H:5: error: 'Upatches' was not declared in this scope /Network/Servers/controller.cluster/Homedir/stsriniv/OpenFOAM/OpenFOAM-1.5/src/f initeVolume/lnInclude/readPISOControls.H:3: warning: unused variable 'nCorr' make: *** [Make/darwinIntelDPOpt/my_interFoam.o] Error 1 My updated MultipleInletVelocity.H file for the first inlet is as below. I suppose something like this can be easily extended to multiple inlets with an or condition in the first if loop. Thanks, Sesha fvPatchVectorFieldField& Upatches = U.boundaryField(); forAll(Upatches, inletPatchID) { if ( mesh.boundaryMesh()[inletPatchID].name() == "inlet1") { // Get reference to boundary value, patch centers fvPatchVectorField& inletU = U.boundaryField()[inletPatchID]; const fvsPatchVectorField& inletFaceCentres = mesh.Cf().boundaryField()[inletPatchID]; scalarField y = inletFaceCentres.component(vector::Y); forAll(y, counter) { if(y[counter] >= 0.02) { inletU[counter] = 0.05*(y[counter]-0.02)*vector(1,0,0); } else { inletU[counter] = 0.0*vector(1,0,0); //0.1*y[counter]*vector(1,0,0); } } U.write(); } } |
|
January 23, 2009, 12:37 |
Hi again.
You need fvPatchF
|
#104 |
Senior Member
|
Hi again.
You need fvPatchFieldFields.H. Please find it here: fvPatchFieldFields.H Then, add the line: #include "fvPatchFieldFields.H" Regards, Jose Santos |
|
January 23, 2009, 13:59 |
Hi Jose,
Thanks for the pro
|
#105 |
New Member
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Hi Jose,
Thanks for the prompt reply. I did the following: Copied the above .H file in the my_interFoam directory. Added the line '#include "fvPatchFieldFields.H"' in the MultipleInletVelocityProfile.H file. A wmake after that gives me the following error. Am I missing something? Thanks, Sesha In file included from MultipleInletVelocityProfile.H:1, from my_interFoam.C:62: fvPatchFieldFields.H: In function 'int main(int, char**)': fvPatchFieldFields.H:40: error: expected primary-expression before 'namespace' fvPatchFieldFields.H:40: error: expected `;' before 'namespace' In file included from my_interFoam.C:62: MultipleInletVelocityProfile.H:4: error: 'fvPatchVectorFieldField' was not declared in this scope MultipleInletVelocityProfile.H:4: error: 'Upatches' was not declared in this scope /Network/Servers/controller.cluster/Homedir/stsriniv/OpenFOAM/OpenFOAM-1.5/src/f initeVolume/lnInclude/readPISOControls.H:3: warning: unused variable 'nCorr' make: *** [Make/darwinIntelDPOpt/my_interFoam.o] Error 1 |
|
January 23, 2009, 18:06 |
Try to add the line:
#inclu
|
#106 |
Senior Member
|
Try to add the line:
#include "fvPatchFieldFields.H in the beginning of the my_interFoam.C file instead (remove it from MultipleInletVelocityProfile.H). Let me know if it works! Regards, Jose Santos |
|
January 26, 2009, 10:03 |
Hi Jose,
Thanks for that po
|
#107 |
New Member
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Hi Jose,
Thanks for that pointer. I seems to have compiled. I will try working with it later and see if something goes wrong at the time of execution. Thanks again, Sesha |
|
January 27, 2009, 01:57 |
hello,
I am solving the case
|
#108 |
New Member
Mat
Join Date: Mar 2009
Location: Mumbai, Maharashtra, India
Posts: 20
Rep Power: 17 |
hello,
I am solving the case for parabolic inlet velocity profile.I have downloaded the tar file and executed "wmake". an executable file has been prepared.Then I have used the the same default "uniform" type inlet B/C and then later go to the case root and execute "setParabolicInlet . case_name".The case_name is parabolicinlet.I am getting the following error. Plz do guide me ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet> setParabolicInlet . parabolicinlet /*---------------------------------------------------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : setParabolicInlet . parabolicinlet Date : Jan 27 2009 Time : 11:34:16 Host : linux PID : 7586 Case : /home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #0 Foam::error::printStack(Foam:stream&) in "/home/ms.wankhede/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/home/ms.wankhede/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib64/libc.so.6" #3 main in "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/applications/bin/linux64GccDPOpt/set ParabolicInlet" #4 __libc_start_main in "/lib64/libc.so.6" #5 Foam::regIOobject::readIfModified() in "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/applications/bin/linux64GccDPOpt/set ParabolicInlet" Segmentation fault |
|
January 27, 2009, 10:29 |
f u know then plz do tell me
|
#109 |
New Member
Mat
Join Date: Mar 2009
Location: Mumbai, Maharashtra, India
Posts: 20
Rep Power: 17 |
f u know then plz do tell me how to correct the following error
ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet> setParabolicInlet inlet1 0.01 -case parabolicinlet /*---------------------------------------------------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : setParabolicInlet inlet1 0.01 -case parabolicinlet Date : Jan 27 2009 Time : 18:53:23 Host : linux PID : 13951 Case : ./parabolicinlet nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // setParabolicInlet: cannot open case directory "./parabolicinlet" FOAM exiting ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet> |
|
January 27, 2009, 11:37 |
Hi,
In OpenFOAM 1.5 you don
|
#110 |
Senior Member
|
Hi,
In OpenFOAM 1.5 you dont need to specify your case if you are located inside your case directory. Try: setParabolicInlet inlet1 0.01 Regards, Jose Santos |
|
January 27, 2009, 23:18 |
Hi,Jose Luis Santos.
when i t
|
#111 |
New Member
Mat
Join Date: Mar 2009
Location: Mumbai, Maharashtra, India
Posts: 20
Rep Power: 17 |
Hi,Jose Luis Santos.
when i tried this way following error is seen, plz do help me to solve this case ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet> setParabolicInlet inlet1 0.01 /*---------------------------------------------------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : setParabolicInlet inlet1 0.01 Date : Jan 28 2009 Time : 09:00:55 Host : linux PID : 4916 Case : /home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #0 Foam::error::printStack(Foam:stream&) in "/home/ms.wankhede/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/home/ms.wankhede/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so" #2 ?? in "/lib64/libc.so.6" #3 main in "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/applications/bin/linux64GccDPOpt/set ParabolicInlet" #4 __libc_start_main in "/lib64/libc.so.6" #5 Foam::regIOobject::readIfModified() in "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/applications/bin/linux64GccDPOpt/set ParabolicInlet" Segmentation fault ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/mrj/parabolicinlet> |
|
January 28, 2009, 05:03 |
this is in relation to above t
|
#112 |
New Member
Mat
Join Date: Mar 2009
Location: Mumbai, Maharashtra, India
Posts: 20
Rep Power: 17 |
this is in relation to above two posts,
plz do tell me if anyone knows gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type setParabolicInput) on patch inlet1 of field U in file "/home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/mrj/parabolicVelocity/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 692. FOAM exiting |
|
February 18, 2009, 08:27 |
Hello,
I have compiled the
|
#113 |
Member
Virginie Ehrlacher
Join Date: Mar 2009
Posts: 52
Rep Power: 17 |
Hello,
I have compiled the setParabolicInlet.C given by Bernhard Gschaider. Everything seemed to compile fine. However, when I run the executable from my case file: setParabolicInlet inlet 0.3 I get the following error: /*---------------------------------------------------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5-dev | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : setParabolicInlet inlet 0.3 Date : Feb 18 2009 Time : 13:20:25 Host : fire PID : 4317 Case : /users/V1117324/OpenFOAM/v1117324-1.5-dev/run/planinclineprofile nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Memory fault Does someone know what it means and how I could solve this? Thank you a lot. Virginie |
|
February 18, 2009, 13:39 |
Hi Virgine!
No idea. That s
|
#114 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Virgine!
No idea. That stuff was written long ago (OF 1.2 or so) and never really maintained (I am amzed that it still compiles) Have a look at http://openfoamwiki.net/index.php/Main_FAQ#An_application_ends_with_a_segmentati on_fault._What_is_wrong.3F and the links leading from that. Something that wouldn't involve programming or recompiling OF would be to do something similar to http://openfoamwiki.net/index.php/Co...t-Room_Example using the -keepPatches-option Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 1, 2009, 12:46 |
Hey Bernhard
I am trying to
|
#115 |
New Member
jerum
Join Date: Mar 2009
Posts: 1
Rep Power: 0 |
Hey Bernhard
I am trying to use parabolic velocity inlet in my LES solver in a pipe flow in parallel. As far as I understood, setparabolic is not working in parallel. I tried to use Håkan parabolic inlet in wiki. It is working properly in parallel and I could get results from it. The problem is that it is not giving an axisymmetric inlet because it assumes y-coordinate as the parabola direction while z-coordinate is also needed to have its parabola.I suppose Håkan solution is not giving a axisymmetric pipe flow and designed for channel flow. Do you have any suggestion how can I modify it to make it work for pipe flow? Thanks in advance for your kind helps and comments. Jerum |
|
March 1, 2009, 13:37 |
Hi Jerum
I will precede Ber
|
#116 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Jerum
I will precede Bernhard and give the answer: Search the forum for "groovyBC" and apply it on your boundary. You will also find a nice wiki. Best regard, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
March 12, 2009, 01:59 |
Dear OpenFoam users,
I'm ne
|
#117 |
New Member
Johannes Alken
Join Date: Mar 2009
Posts: 5
Rep Power: 17 |
Dear OpenFoam users,
I'm new with OpenFoam simulation and I'm deeply impressed about this Source but now I've a question about programing boundary conditions. I try to implement a rotating cylinder boundary condition like a moving wall. I read a lot of possibilities to implement them into the solver icoFoam.C(Version 1.5) and I tried to do this but they didn't work. Is there anybody who can help me? Thanks a lot. |
|
March 12, 2009, 02:03 |
Dear OpenFoam users,
I'm ne
|
#118 |
New Member
Johannes Alken
Join Date: Mar 2009
Posts: 5
Rep Power: 17 |
Dear OpenFoam users,
I'm new with OpenFoam simulation and I'm deeply impressed about this Source but now I've a question about programing boundary conditions. I try to implement a rotating cylinder boundary condition like a moving wall. I read a lot of possibilities to implement them into the solver icoFoam.C(Version 1.5) and I tried to do this but they didn't work. Is there anybody who can help me? Thanks a lot. |
|
March 12, 2009, 17:16 |
Hi Johannes,
This is the co
|
#119 |
Senior Member
|
Hi Johannes,
This is the code I eventually used after reading some posts here in the Discussion Board: label patchID = mesh.boundaryMesh().findPatchID("cylinder_wall"); const polyPatch& cPatch = mesh.boundaryMesh()[patchID]; const vectorField& FaceCentres = cPatch.faceCentres(); point origin(0.5, 0.20, 0.5); vector axis(0, 0, 1); scalar radPerSecond(5); const vectorField& tempRotation = radPerSecond * axis ^ (FaceCentres - origin); U.boundaryField()[patchID] == tempRotation; Info<< "End" << endl; U.write(); See if it fits your needs. Regards, Jose Santos |
|
March 13, 2009, 01:41 |
Hi Jose,
thanks a lot for y
|
#120 |
New Member
Johannes Alken
Join Date: Mar 2009
Posts: 5
Rep Power: 17 |
Hi Jose,
thanks a lot for your answer. First I have to solve some small other problems then I will try your code. It looks good. I will let you know the result next week. thanks again Johannes |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF Unsteady velocity parabolic profile | Rashad | FLUENT | 3 | October 1, 2018 16:27 |
2D air parabolic velocity profile | ilker | FLUENT | 2 | November 12, 2008 09:43 |
parabolic velocity profile? | bssdyl | FLUENT | 4 | March 22, 2006 12:32 |
problem in 3d parabolic velocity profile | Lokesh | FLUENT | 8 | August 11, 2005 06:36 |
Parabolic temperature Inlet Profile in a tube | majestywzh | FLUENT | 0 | April 9, 2003 07:37 |