ramp inlet velocity initial condition using timeVaryingMappedFixedValue
Hi everybody,
I'm trying since days to assign a ramp shape inlet velocity initial condition, that could be crucial for my CFD simulation. I'm trying to do it using the type timeVaryingMappedFixedValue for the boundaryFields called INLET in the velocity file in the "0" directory. Unfortunately I'm not been able to use it properly. Is this the correct tool for such a aim? Has someone already use the ramp inlet for 3D velocity? If yes, could you post an example please? Thank you very much for your support. I remain at your disposal for further explanations. Yours sincerely, Andrea |
Greetings Andrea,
If I understand you correctly, you want to create a velocity profile that is shaped like a ramp, correct? Then maybe the tutorial "incompressible/simpleFoam/pitzDailyExptInlet" would be a good reference. In the folder "constant/boundaryData/inlet" is defined the points used as placement for the values to be defined and in the "constant/boundaryData/inlet/0" folder are the values (profiles) defined for the previously mentioned points. :confused: Mmm, the tutorial is indeed using the "timeVaryingMappedFixedValue" BC... then what's the problem exactly? Best regards, Bruno |
Hi Bruno,
thank you very much for your reply. I had already noticed the tutorial you mentioned but I now realize that maybe I was using in the wrong way the timeVaryingMappedFixedValue type. So, thanks again for your support. But in the end my doubt remains: I'm looking for a time-varying inlet condition, not spatial. To explain it better: I would like that my input inlet boundary velocity condition will start from the 0 value, and grow up to my desired fixed value in a fixed time (it grows iteration by iteration, till the regime value). And this transient should have a ramp shape....or a 1/4 sinusoidal shape...etc... Can the timeVaryingMappedFixedValue do this in your opinion? Hope this could help to understand the issue. Thanks again! Andrea |
Hi Andrea,
Read this thread: http://www.cfd-online.com/Forums/ope...lefile-bc.html ;) In post #7 I make a reference to the polynomial BC... Best regards, Bruno |
Thank you very much.
I read it soon and I will get back to you if necessary. Kind regards, Andrea |
Dear Bruno,
trying to use the polynomial BCs, as you suggest, I write the following lines in the 0/U file: INLET { type uniformFixedValue; uniformValue polynomial ( (0.1 0) (1.3 2.0) (2.7 3.0) ); to reproduce the example of your post. http://www.openfoam.org/version2.1.0...conditions.php I've tried on two different system: on my notebook, where the 2.1.1 version is installed the following error is reported: Reading field U --> FOAM FATAL ERROR: Unknown DataEntry type polynomial for DataEntry uniformValue Valid DataEntry types are: 5 ( CompatibilityConstant constant csvFile table tableFile ) From function DataEntry<Type>::New(const word&, const dictionary&) in file /home/andrea/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/DataEntryNew.C at line 57. FOAM exiting while on the cluster on which I'm working, where the v2.1.0 is installed: Reading field U --> FOAM FATAL ERROR: Unknown DataEntry type polynomial for DataEntry uniformValue Valid DataEntry types are: 4 ( constant csvFile table tableFile ) From function DataEntry<Type>::New(Istream&) in file /data/apps_exa/bin/OpenFOAM//OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/DataEntryNew.C at line 48. FOAM exiting This sounds me really odd, because in the page you posted to me it is clearly stated that this new feature has been implemented in the OpenFOAM v2.1.0 What is your opinion about it? Thanks again, I really appreciate you help! Andrea |
Hi Andrea,
It looks like the polynomial option is only valid for scalar fields. Which means that vector fields such as "U" will not work :( Checking the header in "src/OpenFOAM/primitives/functions/DataEntry/polynomial/polynomial.H": Quote:
Bruno |
Hi,
I've tried to apply the polynomial law to a scalar field for the same problem but the error reported is the same posted above. I really don't understand.... |
Hi Andrea,
Looks like this is a bug... I've reported this here: http://www.openfoam.org/mantisbt/view.php?id=607 I'm going to look into the code to see if I can figure out why it's not working as intended... but I doubt I'll be able to figure it out :( Best regards, Bruno |
Thank you Bruno.
In the meantime I will try to use the csv file with my tabulated data. About this, I think I should fill the table just with the 3 components of velocity (3 columns) and each row correspond to a single time step. Is this right in your opinion? Have you already tested the csv file mode? Kind regards, Andrea |
Hi Andrea,
OK, the polynomial bug has been fixed in the latest 2.1.x: https://github.com/OpenFOAM/OpenFOAM...a3f4646a560477 As for tabled data:
Bruno |
Thank you Bruno,
on my notebook, where the 2.1.x is working, everything seems to running well. On the cluster with OF v2.1.0 the already-known error of the parallel mode is reported. Thanks for your support, I will work on this unsteady condition and I will get back to you if necessary. Kind regards, Andrea |
Hi there, pepe!
I was wondering if you finally managed this issue as I'm trying to run a ramp velocity inlet past a cylinder but unfortunately I don't get nice results in the pressure field until the ramp has finished... I am using the unifomrFixedValue type and the table. About the table, I guess one must to write the ramp extrema... am I correct?? where is the problem?? Best regards!! |
Hi wyldckat,
I'm trying to set up a velocity component varying with y locations (say u_x = -100*y^2 + 200). Can you give me any suggestion for it? Thanks a lot. Raymond |
Greetings Raymond,
Quick answer: GroovyBC comes to mind:
Bruno |
Quote:
Thanks for your reply. I made up a parabolic profile for velocity inlet like Code:
inletL Code:
libs ( "libOpenFOAM.so" "libgroovyBC.so" ); Code:
Create mesh for time = 0 Cheers, Raymond |
Hi Raymond,
Since you asked the same question on two different threads, several days apart, I'll answer to the latest post there, namely at: http://www.cfd-online.com/Forums/ope...tml#post447189 post #8 Best regards, Bruno |
Transient Velocity Boundary Condition
Hello Guy,
I wanted to specify transient velocity boundary condition in OpenFOAM, which evolves with time. The boundary condition will be computed at each time step using the coordinate of the each face center at the inlet and the current physical time of the simulation. I have looked the timeVaryingMappedFixedValueFvPatchField boundary condition but it uses already calculated date and map it. However, I wanted to calculate the non-uniform velocity distribution of a patch at each time step. Thank you very much in advance. Any help will be appropriated. |
All times are GMT -4. The time now is 13:18. |