|
[Sponsors] |
July 3, 2006, 08:08 |
Hi, Anja,
I'm using 1.3. I tr
|
#41 |
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17 |
Hi, Anja,
I'm using 1.3. I tried the same type "timeVaryingUniformFixedValue", it's running properly. You just typed "solver . case", then it should run. |
|
July 5, 2006, 06:23 |
Hi,
okay for so far. The ne
|
#42 |
Member
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 17 |
Hi,
okay for so far. The next error message after starting the time loop is: --> FOAM FATAL IO ERROR : file "inlet.dat" does not exist. Where does the inlet.dat have to be? I've tried it at different places. Thanks Anja |
|
July 5, 2006, 07:43 |
Hi,
Ok, I can take my simul
|
#43 |
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17 |
Hi,
Ok, I can take my simulation as an example. I used sonicTurbFoam, and put "inlet.dat" in $FOAM_RUN/tutorial/sonicTurbFoam/. This time the file should be located. |
|
July 5, 2006, 07:54 |
Unfortunately that doesn't wor
|
#44 |
Member
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 17 |
Unfortunately that doesn't work, too.
Here is the complete error message: Starting time loop Time = 0.0001 Mean and max Courant Numbers = 0 0.800423 BICCG: Solving for Ux, Initial residual = 1, Final residual = 6.10507e-07, No Iterations 3 BICCG: Solving for Uy, Initial residual = 1, Final residual = 6.10507e-07, No Iterations 3 BICCG: Solving for Uz, Initial residual = 1, Final residual = 7.29578e-07, No Iterations 3 --> FOAM FATAL IO ERROR : file "inlet.dat" does not exist file: inlet.dat at line 1. From function IFstream::operator() in file db/IOstreams/Fstreams/IFstream.C at line 160. FOAM exiting Any other suggestions? |
|
July 13, 2006, 03:06 |
Hallo Dr.Jasak,
According to
|
#45 |
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 17 |
Hallo Dr.Jasak,
According to your message on June 27, I implemented the easy transient boundary condition. But now I'm trying to make it more user-friendly. The idea is that there should be a dictionary file similar to "calcMassFlowDict" in the system file of some case to the solover. So I can edit it each time without recompiling. I guess I should create a C file in ~/OpenFOAM/OpenFOAM-1.3/applications/utilities/preProcessing/ to pass parameters to the timeVaryingUniformTotalPressureFvPatchScalarFields .C . But how to write this part of code? I referenced the code in calcMassFlow, but I still don't understand how to let the parameters be read into the timeVaryingUniformTotalPressure file. Please give me some suggestions. Thanks so much in advance! |
|
October 9, 2006, 11:47 |
Dear all,
I have a question
|
#46 |
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17 |
Dear all,
I have a question about the timeVaryingUniformFixedValueFvPatchField BC, if I drop the interpolation part could it be used without big modifications also for non uniform scalar/vector fields? thanks in advance for any hints, Daniele |
|
October 9, 2006, 12:20 |
Hi Daniele!
I don't think s
|
#47 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Daniele!
I don't think so. As far as I understand it the interpolation part is the stuff that interpolates between the different time-points which are read from a file (making a steady transition possible). XY has nothing to do with the geometry. But basically anything can be done with BCs derived from fixedValue. The problem is: should the shape at the inlet be always the same (only scaled)? In that case you could introduce an additional boundary field that is scaled by the function and written to the actual boundary field. Or if you know your BC as a f(t,x,y,z) (this time x,y being he coordinates) you just write a new BC with a fitting updateCoeffs-method. The possibilies are endless.
__________________
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 |
|
October 9, 2006, 13:31 |
Hi Bernhard,
I have underst
|
#48 |
Senior Member
Daniele Panara
Join Date: Mar 2009
Posts: 101
Rep Power: 17 |
Hi Bernhard,
I have understood the interpolation, but what I would like to do is to impose a inlet.dat in the form: ( t0 p0(nonuniform List<scalar> (or <vector> n ( n1 n2 ... nn ) t1 p1(nonuniform List<scalar> n ( n1 n2 ... nn ) ... tn pn(nonuniform List<scalar> n ( n1 n2 ... nn ) ) in order to read at each time step a different profile without interpolating between two different time step. I would like to use infact the profiles of an old LES computation as time varying inlet values of a new one. I guess I should modify the graph class in order to do that but I am getting a bit lost in the doxygen, I am not very familiar with C++. Do you think that it can be done in a not so complicated way? Do you have any hints on how to do that? Thanks for your feedback anyway Daniele |
|
October 9, 2006, 14:15 |
Hi Daniele!
First: sorry fo
|
#49 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Daniele!
First: sorry for implying you didn't read the source The thing you want do do shouldn't be a big problem: just get your data into a List<scalarlist> p (construction with p(IFstream("myFile")) could work if myFile is in the correct format). Then in updateCoeff it should (havn't done it yet) be sufficient to do operator==(p[n]) (obviously you've got to keept track of n). My problem with your approach is that you're constraining yourself to the same time-step as the original simulation (but if that's ok with you ....). My recommendation would be if you know that tNow is between t[n] and t[n+1] to do something like this: scalar f=(tNow-t[n])/(t[n-1]-t[n]); operator==(f*p[n+1]+(1-f)*p[n]); (which of course is a interpolation)
__________________
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 |
|
October 23, 2006, 05:23 |
Dear all,
Firstly, i am a n
|
#50 |
New Member
alexej goehring
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
Dear all,
Firstly, i am a newby to this sofware and would like to try some incompressible LES simulations using a non-constant LES inlet condition. As far as i understand i would be choosing the specific turbulence model in the oodles directory. Please correct me if i'm wrong! Secondly, i read through the posted messages, but didn't really understand the part on how to use the information from a file as LES inlet conditions. I have a text file that provides velocity vectors for U,V and W as a function of position (y,z) and time (t) for every node on the inlet plane. What would be the best way of reading that information in? (btw. the text file is about 160Mb) I would be very greatful for some hints/ideas. cheers, alexej |
|
October 23, 2006, 05:27 |
Dear all,
Firstly, i am a n
|
#51 |
New Member
alexej goehring
Join Date: Mar 2009
Posts: 2
Rep Power: 0 |
Dear all,
Firstly, i am a newby to this sofware and would like to try some incompressible LES simulations using a non-constant LES inlet condition. As far as i understand i would be choosing the specific turbulence model in the oodles directory. Please correct me if i'm wrong! Secondly, i read through the posted messages, but didn't really understand the part on how to use the information from a file as LES inlet conditions. I have a text file that provides velocity vectors for U,V and W as a function of position (y,z) and time (t) for every node on the inlet plane. What would be the best way of reading that information in? (btw. the text file is about 160Mb) I would be very greatful for some hints/ideas. cheers, alexej |
|
November 14, 2006, 18:21 |
Hi
I would like to do simple
|
#52 |
New Member
Shawn Pfeil
Join Date: Mar 2009
Posts: 11
Rep Power: 17 |
Hi
I would like to do simple pressure driven flow. I think the inlet boundary condition I need is somthing like { type patch; physicalType pressureInlet; nFaces 480; startFace 200; } How do I specify the pressure on the patch? Have I misunderstood that pressureInlet takes a given pressure and creates a consistent velocity field consistent with continuity at the boundary? I know for an incompressible fluid only the difference in pressure between inlet and outlet will matter. Shawn |
|
November 15, 2006, 03:52 |
You can specify the pressure v
|
#53 |
Senior Member
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20 |
You can specify the pressure value in a boundary file (dictionary) in a time directory, like 0/p:
/*---------------------------------------------------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.0.2 | | \ / A nd | Web: http://www.openfoam.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ // Field Dictionary FoamFile { } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 100000; boundaryField { } inlet { } outlet { }</blockquote> } // ************************************************** *********************** // In the above example there is a patch on which zero gradient is set, and two other on wich fixed value is specified. Dragos |
|
June 18, 2007, 14:21 |
using foamUser lib to define a
|
#54 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
using foamUser lib to define a new b.c
(1) I copied foamUser to: /data/maka/OpenFOAM/maka-1.3/applications (2) I changed its Make/files to: libfoamUser.C LIB = $(FOAM_USER_LIBBIN)/libfoamUser (3) I changed Make options to: LIB_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lincompressibleLESmodelsUser // I added User to not to conflict with the default library. (4) I created a folder for the new b.c.: /data/maka/OpenFOAM/maka-1.3/src/LESmodels/incompressible/newBC and compile it to: LIB = $(FOAM_USER_LIBBIN)/libincompressibleLESmodelsUser (5) the compilation works with no problem but when I run the solver (channelOodles) the new b.c. works. BUT when I run icoFoam (without using the new b.c.) it gives the following error: icoFoam: symbol lookup error: /data//OpenFOAM/-1.3/lib/linuxAMD64Gcc4DPOpt/libincompressibleLESmodelsUser.so: undefined symbol: _ZN4Foam8LESmodel8typeNameE My questions: a) How can I know if a solver was linked to foamUser.so in the first place? b) since no we have another foamUser.so in $(FOAM_USER_LIBBIN), how openFoam selects the correct one? c) why I get error from icoFoam but not from channelOodles? Thanks. Best regards, Maka |
|
June 19, 2007, 09:44 |
I looked harder for an answer
|
#55 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
I looked harder for an answer for the above questions:
a) I found that foamUser is linked to OpenFOAM using the following line in options file in OpenFOAM-1.3/src/OpenFOAM/Make: LIB_LIBS = -L$(FOAM_LIBBIN)/dummy -lPstream -lfoamUser -lz This is how it is available for all the solvers and utilities. b) By looking at g++ command and manual: g++ ... -shared libfoamUser.o -L/data/maka/OpenFOAM/OpenFOAM-1.3/lib/linuxAMD64Gcc4DPOpt -L/data/maka/OpenFOAM/maka-1.3/lib/linuxAMD64Gcc4DPOpt -lfoamUser ... which as user guide says: first g++ looks OpenFOAM-1.3/lib/ and then one specified in options file (/OpenFOAM/maka-1.3/lib/). But the question is: if in both folder there is a .so library with same name(like libfoamUser.so), what happens? The latter overrides the earlier or once a function definition is found the compiler does not look for it anymore (in this case the earlier has higher precedence while the latter may complement it). ?? c) ??? Thanks. Best regards, Maka |
|
June 19, 2007, 10:27 |
c) I tried to go and recompile
|
#56 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
c) I tried to go and recompile icoFoam to get some message about the error. I got the following:
/data/maka/OpenFOAM/maka-1.3/lib/linuxAMD64Gcc4DPOpt/libfoamUser.so: undefined reference to `Foam::LESmodel::typeName' /data/maka/OpenFOAM/maka-1.3/lib/linuxAMD64Gcc4DPOpt/libfoamUser.so: undefined reference to `typeinfo for Foam::LESmodel' Now, It makes sense. I was trying to make any new boundary condition (b.c.) that I will create for LES (wall function) available for all LES models using foamUser. Since foamUser makes such b.c. available to all solvers and such b.c. depends on some LES feature (nuSgs). This needs such LES feature to be available for all solvers so they understand what this b.c. is about (some thing that one should not do). I wonder if there is a way to solve this using foamUser. What I thought about is to make a dummy library foamUserLES and compile it with a library from LES that is read by all LES solvers and utilities. Then use such a library in future to add new b.c.s. for LES only. I would welcome any correction of my understanding. Thanks. Best regards, Maka. |
|
June 19, 2007, 14:43 |
- link in whatever lib contain
|
#57 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
- link in whatever lib contains nuSgs into foamUser. But then all codes carry around a lot of unused code.
- (ab)use the function objects. E.g. for a certain application I need to load in a few extra libraries. I used a dummy probes functionObject in the system/controlDict. This works great for specialised bc's since they are usually specific to a case. functions ( // Dummy probes to load in libParMetis probes1 { type probes; functionObjectLibs ( "libsampling.so" "libparMetisDecompositionMethod.so" ); region region0; probeLocations(); fields(); } ); |
|
June 21, 2007, 14:43 |
I tried to make a foamUserLESm
|
#58 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
I tried to make a foamUserLESmodelsIncompressible and link it to LESmodels/incompressable. Then one can use it to add any new b.c. or LES model to the incompressible LES library without recompiling. It worked. Thanks for the idea regarding using function objects.
Best regards, Maka |
|
April 11, 2008, 10:12 |
Hi All
I am trying to use
|
#59 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi All
I am trying to use timeVaryingUniformFixedValueFvPatchField for my application here. Since last discussion has been for OF-1.3 and I am currently using OF-1.4.1. So there has been some confusion about the problem. I am using the default cavity problem of icoFoam. I specified the movingWall patch as timevaryinguniformFixedValue, as: movingWall { type timeVaryingUniformFixedValue; timeDataFileName "movingWall.dat"; value uniform 1e5; } I made a director in constant named "movingWall" and kept the file movingWall.dat there, which read: ( 0.0 1 0.1 1.2 0.2 1.4 0.3 1.6 0.4 1.8 0.5 2.0 ) After running this programm, Its complaining that file movingWall.dat cant be find. The error is: Starting time loop Time = 0.005 Courant Number mean: 0 max: 0 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8 --> FOAM FATAL IO ERROR : file "movingWall.dat" does not exist file: movingWall.dat at line 1. From function IFstream::operator() in file db/IOstreams/Fstreams/IFstream.C at line 171. FOAM exiting Can you tell me, where I am going wrong? Is the file location correct? cheers!!
__________________
Thanks and regards, Nishant |
|
May 17, 2008, 00:47 |
the data file must be at the l
|
#60 |
Guest
Posts: n/a
|
the data file must be at the location from where are launching the solver. It would be much better if the implementation makes it to be available in the <root> directory (wishlist ;) ).
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Transient boundary conditions | Dave | FLUENT | 5 | October 30, 2011 09:58 |
Transient boundary conditions in CFX | Sohail Ahmed | CFX | 2 | December 11, 2007 14:01 |
Transient boundary conditions | Yannick | FLUENT | 6 | November 6, 2007 08:47 |
Transient Boundary Conditions | James Date | CFX | 5 | September 13, 2004 12:34 |