time dependence - inlet velocity - validation (paper)
Hi. how can I use this velocity profile(inlet) in my simulation? My code gives error( as follows).
This is the picture of my profile (please, see FIG. 2 ): http://www.ijens.org/Vol_13_I_03/133...JMME-IJENS.pdf I tried use this code: Code:
nlet And the time-series example file: Code:
( But gives the following error: HTML Code:
a@a-Aspire-V3-571:~/Desktop/teste_time_series/pitzDaily$ pimpleFoam Best Regards, Vitor |
Hi,
it's just Code:
uniformFixedValue |
alexmye, gives erros again...:(
see: Code:
a@a-Aspire-V3-571:~/Desktop/teste_time_series/pitzDaily$ pimpleFoam Code:
FoamFile Code:
( Code:
( |
Hi,
guess I missed it ;) So let's go to source file of the BC and check syntax: this is for constant (uniformFixedValueFvPatchField.H) Code:
myPatch Code:
myPatch Quote:
|
ok.. My mesh is from pitzDaily tutorial case. My inlet is exactly the same from the case, with normal vector = (1,0,0) , as you can see:
http://postimg.org/image/r6ouivpuf/ But, I did not undertand well how would be my time-serie file... For example, If my intention is to generate the following inlet velocity time-serie: 0 seconds = (1 0 0) -> velocity vector to the patch face of 1m/s in x direction,because normal face is (1,0,0) 0.5 seconds = (5 0 0) -> velocity vector to the patch face of 5m/s in x direction 1 seconds = (10 0 0) -> velocity vector to the patch face of 10m/s in x direction 1.5 seconds = (0 0 0) -> velocity vector to the patch face of 0m/s in x direction My file would be: Code:
( Code:
Code:
/*---------------------------------------------------------------------------*\ |
Hi,
the error is quite obvious (and the reason for it was explained in error message), you have to specify file name as a string (i.e. use quotation marks). Concerning your first question, it depends on how you'd like the velocity to change. With the file you've posted it'll linearly increase from 1 to 5 during 0.5 s, the to 10 during next 0.5 s and finally linearly go to zero during next 0.5 s. If it's what you want, yes, file is right. About format, it seems to be correct. Also you can try to use csvFile, it has more clear configuration dictionary: Code:
csvFileCoeffs |
ok.
For those in the future have the same question that I follow the solution to my original question. The solution was given by our friend Alexeym. Thank you Alex! I just had to make a correction in the time series file, inserting brackets as seen below. Then follows my test case to other beginers (like me). I changed the name of "time-series" for "time"): Here is it: http://www.4shared.com/rar/IM-5z-lzb...ity_chang.html Alex, can you tell me the other schemes beyond the linear interpolation? They are mentioned in the documentation or some other file? I am studying the openfoam shortly. Sorry, I'm still very novice. Thank you! I hope this post can help others. |
Hi,
Quote:
In your case put banana instead of linear for interpolationScheme. Or you can go to $WM_PROJECT_DIR/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.H (well, not exactly TableFile/TableFile.H but Table/Table.H, as TableFile is more-or-less just responsible for I/O), learn that interpolation is done via interpolationWeights class, then go to $WM_PROJECT_DIR/src/OpenFOAM/interpolations/interpolationWeights and learn that there are two subclasses: linear and spline. I guess, first method is simpler. |
Pressure instead of velocity
Hello. How would the syntax be if I was to load pressure at inlet from a .csv?
for instance something like this? t=0 : p=0 t=0.1:p=1 t=0.2:p=2 also I guess that the time set in contradict would have to match time in 0-directory? |
Hi,
in general CSV files have the following format (http://tools.ietf.org/html/rfc4180): val11,val12 val21,val22 ... So your pressure CSV file should be something like: 0,0 0.1,1 0.2,2 ... Didn't quite get the second part of the question. |
Hello. I I´m trying to do this now, and my code looks like this:
PHP Code:
PHP Code:
|
Eh... you've forgotten semicolon after
Code:
fileName "~/Table_Pressure" |
componentColumns
aha. Thanks:)
Now it manages to read the file and solving, but it seems like it only uses the value in the first row: 0,4 which is time=0, pressure=4 from then on the pressure is constant and does not change according to the .csv file next couple of rows are: 0.04,3.5052 0.08,2.1433 0.12,0.2511 but from the solution the pressure is kept constant at the inlet my code is as follows: PHP Code:
|
Post your case. I've just created test case and pressure follows CSV-file values.
|
Cavity_Case_Pessure_From_CSV
1 Attachment(s)
Here it is. Tried with and without having commas after the pressures in the csv file.
Thanks Fred |
Well ;)
1. You've got wrong line endings (Windows?), so I guess OpenFOAM reads the file as a single line (then takes 0 as a single time value in the table and 4 as a single pressure value). 2. When I corrected line ending, I also found that after 0.96 you go back in time to 0.1. This also makes OpenFOAM quite unhappy. |
Aha. yeah I made a new file now, which works. I made the original in excel and than exported as .csv, maybe something went wrong. Thanks a lot for your help:)
Fred |
Quote:
I have the same question. I would like to see your files since it gives me an error when I run the decomposePar. I could not get it from the link you mentions, so can you please give me your files to have a look? Thank you very much Methma |
Quote:
Thanks, Methma |
hello,
I know the thread is old but maybe you can help me with a very similar issue. My inlet patch, under the name "throat" has a uniformFixedValue BC. My settings are: throat { type uniformFixedValue; uniformValue csvFile; csvFileCoeffs { fileName "~/Documenti/Lorenzo/Materie_quinto_anno/Tesi_Les_Naso/Manara_Copia/DeltaPTot/pressure_profile.dat"; nHeaderLine 0; mergeSeparators no; oufOfBounds clamp; refColumn 0; componentColumns (1); } } I just copied them from the uploaded cavityOscPcsv case. Using pimpleFoam as solver for my case I get the following error: FOAM FATAL IO ERROR: keyword uniformValueCoeffs is undefined in dictionary "/home/user/Documenti/Lorenzo/Materie_quinto_anno/Tesi_Les_Naso/Manara_Copia/DeltaPTot/0/p.boundaryField.throat" file: /home/user/Documenti/Lorenzo/Materie_quinto_anno/Tesi_Les_Naso/Manara_Copia/DeltaPTot/0/p.boundaryField.throat from line 76 to line 85. From function dictionary::subDict(const word& keyword) const in file db/dictionary/dictionary.C at line 648. FOAM exiting What am I missing to specify? Thanks |
Quote:
|
All times are GMT -4. The time now is 09:29. |