|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
Hi!
I'd like to impose parabolic profile of velocity at inlet of my 3D Y-pipes shape because I'm simulating poiseuille flow. As the flow is driven by velocity I leave 'free' P at inlet, outlet and wall (zeroGradient). the internalField is uniform (0). I write the following 0/U file: FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type codedFixedValue; value $internalField; redirectType ramp; code #{ scalar U_0=(0 0 0.049954); //mean U.This isn't the max velocity of the profile. scalar r=0.02; //mean Radius. in the 3 pipes radius are different. fixedValueFvPatchVectorField myPatch(*this); forAll(this->patch().Cf(),i) { myPatch[i]=vector(2*U_0*(1-Foam:Pow(this->patch().Cf()[i].x(),2)/pow(r,2)),0,0); } operator==(myPatch); #}; } outlet { type zeroGradient; } Walls { type fixedValue; value uniform (0 0 0); } } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** * * // There should be something wrong because I have and error runing icoFoam... Can you help me????? ![]() thank you so much. |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Akshay Kumar
Join Date: Aug 2010
Posts: 20
Rep Power: 4 ![]() |
Hey Elisa
Could you post the error message? Akshay |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
This is the error I have:
--> FOAM FATAL IO ERROR: Loading a shared library using case-supplied code is not enabled by default because of security issues. If you trust the code you can enable this facility be adding to the InfoSwitches setting in the system controlDict: allowSystemOperations 1 The system controlDict is either ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict or $WM_PROJECT_DIR/etc/controlDict file: /home/cosine/OpenFOAM/cosine-2.2.0/run/config1/0/U.boundaryField.inlet from line 35 to line 39. From function codedBase::updateLibrary() in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 81. FOAM exiting Any suggestion? |
|
|
|
|
|
|
|
|
#4 |
|
New Member
Akshay Kumar
Join Date: Aug 2010
Posts: 20
Rep Power: 4 ![]() |
Hey Elisa
You need to enable the 'allowSystemOperations' switch if you want to use codestream. You should find this in the /etc/controlDict file as the error log suggests. It'll be in the InfoSwitches block. Just make it '1'. Try this and let me know if it's working. Cheers! Akshay |
|
|
|
|
|
|
|
|
#5 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
Yes, it seems working!
But I still have the problem in 0/U.boundaryField.inlet folder. Do you know the meaning of it? The error is the following: --> FOAM FATAL IO ERROR: Failed wmake "dynamicCode/ramp/platforms/linux64GccDPOpt/lib/libramp_4339e3a808a66e5078fd653aa8a6180bb899c643.s o" file: /home/cosine/OpenFOAM/cosine-2.2.0/run/config1/0/U.boundaryField.inlet from line 35 to line 39. From function codedBase::createLibrary(..) in file db/dynamicLibrary/codedBase/codedBase.C at line 202. FOAM exiting Thank you!!! |
|
|
|
|
|
|
|
|
#6 |
|
New Member
Akshay Kumar
Join Date: Aug 2010
Posts: 20
Rep Power: 4 ![]() |
............
|
|
|
|
|
|
|
|
|
#7 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
Does it mean that you don't have any idea?
|
|
|
|
|
|
|
|
|
#8 |
|
New Member
Akshay Kumar
Join Date: Aug 2010
Posts: 20
Rep Power: 4 ![]() |
Hey
Just a few small changes here. Works for me. #{ scalar U_0=0.049954; //mean U.This isn't the max velocity of the profile. scalar r=0.02; //mean Radius. in the 3 pipes radius are different. fixedValueFvPatchVectorField myPatch(*this); forAll(this->patch().Cf(),i) { myPatch[i]=vector(2*U_0*(1-Foam : : pow(this->patch().Cf()[i].x(),2)/Foam : : pow(r,2)),0,0); } operator==(myPatch); #}; I've intentionally given spaces between the Foam : : pow otherwise the smiley appears Cheers! Ak |
|
|
|
|
|
|
|
|
#9 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
Thank you so much!
Actually I'm really confused: now I have this kind of error: ![]() --> FOAM FATAL ERROR: Unknown functionEntry '' in "C:/Users/Administrator/Desktop/OpenFOAM/USRNAME-1. .0/Y/0/U" near line 48 Valid functionEntries are : 4 ( include includeIfPresent inputMode remove ) From function functionEntry::execute(const word& functionName, dictionary& arentDict, Istream&) in file db/dictionary/functionEntries/functionEntry/functionEntry.C at line 83. FOAM exiting what is the meaning of this error?? how can I try to fix it? ![]() Sorry for all my questions!!!!
Last edited by Guenda; April 23, 2013 at 11:58. |
|
|
|
|
|
|
|
|
#10 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
I forgot to write that as soon as the simulation starts this warning appears:
--> FOAM Warning : From function IOstream::compressionEnum(const word&) in file db/IOstreams/IOstreams/IOstream.C at line 74 bad compression specifier 'off', using 'uncompressed' Create mesh for time = 0 |
|
|
|
|
|
|
|
|
#11 |
|
New Member
Akshay Kumar
Join Date: Aug 2010
Posts: 20
Rep Power: 4 ![]() |
well well well...i'll need to look at your U file. send it across..and also your controlDict.
|
|
|
|
|
|
|
|
|
#12 |
|
New Member
Elisa
Join Date: Mar 2013
Posts: 10
Rep Power: 2 ![]() |
I should have fixed the 'warning' changing in controlDict 'writeCompression off;' in 'uncompressed;'. I don't have that warning but I still have the error.
My 0/U file is: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { //type zeroGradient; //for simpleFOAM //type freestream; //freestreamValue uniform (0 0 0 4.94745); //uniche condizioni x cui si ha qlc: //type fixedValue; //pressureInletVelocity; //value uniform (0 0 0.049954); //codice matlab 1/3 //Profilo parabolico type codedFixedValue; value $internalField; redirectType ramp; code #{ scalar U_0=0.049954; //Umean scalar r=11.75; //radius fixedValueFvPatchVectorField myPatch(*this); forAll (this->patch().Cf(),i) { myPatch[i]=vector(2*U_0*(1-Foam:: pow(this->patch(),Cf()[i].x(),2)/Foam:: pow(r,2)),0,0); } operator==(myPatch); #}; } outlet { type zeroGradient; //freestream; //freestreamValue uniform (0 0 1.44048); //type fixedValue; //value uniform (0 0 0.0716); } wall { //type zeroGradient; type fixedValue; value uniform (0 0 0); } //defaultFaces //{ // type zeroGradient; // } } // ************************************************** *********************** // and controlDict: application icoFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 0.5; deltaT 0.067909; writeControl timeStep; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; thank you!
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| velocity profile inlet boundary condition question | Lcw | FLUENT | 3 | August 3, 2012 05:53 |
| parabolic inlet velocity condition | ofslcm | OpenFOAM Programming & Development | 9 | April 11, 2012 15:42 |
| 2D air parabolic velocity profile | ilker | FLUENT | 2 | November 12, 2008 08:43 |
| How to create a parabolic velocity profile | Nelson | FLUENT | 0 | July 7, 2005 02:49 |
| Variables Definition in CFX Solver 5.6 | R P | CFX | 2 | October 26, 2004 02:13 |