|
[Sponsors] |
ramp inlet velocity initial condition using timeVaryingMappedFixedValue |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 31, 2012, 05:02 |
ramp inlet velocity initial condition using timeVaryingMappedFixedValue
|
#1 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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 |
|
July 31, 2012, 05:09 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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. Mmm, the tutorial is indeed using the "timeVaryingMappedFixedValue" BC... then what's the problem exactly? Best regards, Bruno
__________________
|
|
July 31, 2012, 05:40 |
|
#3 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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 |
|
July 31, 2012, 05:47 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
July 31, 2012, 05:52 |
|
#5 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
Thank you very much.
I read it soon and I will get back to you if necessary. Kind regards, Andrea |
|
July 31, 2012, 06:48 |
|
#6 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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 |
|
July 31, 2012, 07:38 |
|
#7 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
||
July 31, 2012, 07:48 |
|
#8 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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.... |
|
July 31, 2012, 18:37 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
August 1, 2012, 04:58 |
|
#10 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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 |
|
August 1, 2012, 06:05 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
August 2, 2012, 12:19 |
|
#12 |
New Member
Join Date: Apr 2011
Posts: 28
Rep Power: 15 |
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 |
|
March 4, 2013, 15:16 |
|
#13 |
Member
Join Date: Jun 2011
Posts: 80
Rep Power: 15 |
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!! |
|
July 31, 2013, 06:50 |
|
#14 |
Member
Join Date: Feb 2012
Posts: 59
Rep Power: 14 |
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 |
|
August 17, 2013, 14:35 |
|
#15 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Raymond,
Quick answer: GroovyBC comes to mind:
Bruno
__________________
|
|
August 19, 2013, 05:59 |
|
#16 | |
Member
Join Date: Feb 2012
Posts: 59
Rep Power: 14 |
Quote:
Thanks for your reply. I made up a parabolic profile for velocity inlet like Code:
inletL { type groovyBC; variables "yp=pts().y;minY=min(yp);maxY=max(yp);rad=0.5*(maxY-minY);vavg=0.23;"; valueExpression "2.0*vavg*(1.0-pow(pos().y/rad,2))*normal()"; value uniform (10 0 0); } Code:
libs ( "libOpenFOAM.so" "libgroovyBC.so" ); Code:
Create mesh for time = 0 Reading field p Reading field U --> FOAM FATAL IO ERROR: keyword boundaryField is undefined in dictionary "/home/parallels/OpenFOAM/..../0/U" file: /home/parallels/OpenFOAM/..../0/U from line 17 to line 48. From function dictionary::subDict(const word& keyword) const in file db/dictionary/dictionary.C at line 461. FOAM exiting Cheers, Raymond Last edited by wyldckat; August 22, 2013 at 08:15. Reason: Added [CODE][/CODE] |
||
August 22, 2013, 08:17 |
|
#17 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
August 16, 2017, 01:11 |
Transient Velocity Boundary Condition
|
#18 |
New Member
Abiy Melaku
Join Date: Jul 2016
Location: Western University
Posts: 5
Rep Power: 10 |
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. |
|
Tags |
inlet, ramp, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
transsonic nozzle with rhoSimpleFoam | Unseen | OpenFOAM Running, Solving & CFD | 8 | July 1, 2022 07:54 |
Compressible Nozzle Flow | sebastian | OpenFOAM Running, Solving & CFD | 14 | September 21, 2016 11:47 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Error log | vw.cfd | OpenFOAM | 6 | August 7, 2009 06:44 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |