|
[Sponsors] |
Error with timeVaryingUniformTotalPressure and timeVaryingUniformFixedValue patch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 22, 2009, 17:04 |
Error with timeVaryingUniformTotalPressure and timeVaryingUniformFixedValue patch
|
#1 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi forum
I am trying to implement the timeVaryingUniformTotalPressure boundary condition for the channel flow simulation in sonicFoam solver. I want to give a time varyingpressure condition at the inlet from the file inlet.dat. I havent used this BC before and I am having some problem in implementation. The solver failed to run with error message: gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type timeVaryingUniformTotalPressure) on patch inlet of field p in file "/home/e343880/OpenFOAM/e343880-1.5/run/tutorials/sonicFoam/channel-sonic0-inletdat/0/p" You are probably trying to solve for a field with a generic boundary condition. From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 692. The Make/options file in the solver reads: EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = -lfiniteVolume LATER ON, when I tried to recompile the folder: /home/e343880/OpenFOAM/OpenFOAM-1.5/src/finiteVolume then I noticed that there are some errors here. They are complaining about some error about undefined reference to the triSurface() function. I was wondering if this has something to do with the problem mentioned above? Error reported is: meshCutSurface.C.text+0x5b52): undefined reference to `Foam::triSurface:perator=(Foam::triSurface const&)' meshCutSurface.C.text+0x5b68): undefined reference to `Foam::triSurface::~triSurface()' meshCutSurface.C.text+0x5b76): undefined reference to `Foam::triSurface::~triSurface()' meshCutSurface.C.text+0x5d5f): undefined reference to rientedSurface::~orientedSurface()]+0x24): undefined reference to . . . `Foam::triSurface::~triSurface()' Make/linuxGccDPOpt/meshCutSurface.o: In function `Foam::meshCutSurface::~meshCutSurface()': meshCutSurface.C.text._ZN4Foam14meshCutSurfaceD0Ev[Foam::meshCutSurface::~meshCutSurface()]+0x29): undefined reference to `Foam::triSurface::~triSurface()' Make/linuxGccDPOpt/meshCutSurface.o: In function `Foam:rientedSurface::~orientedSurface()': meshCutSurface.C .text._ZN4Foam15orientedSurfaceD0Ev[Foam:rientedSurface::~orientedSurface()]+0x29): undefined reference to `Foam::triSurface::~triSurface()' Make/linuxGccDPOpt/meshCutSurface.o.data.rel.ro._ZTVN4Foam14meshCutSu rfaceE[vtable for Foam::meshCutSurface]+0x10): undefined reference to `Foam::triSurface::movePoints(Foam::Field<Foam::Ve ctor<double> > const&)' Make/linuxGccDPOpt/meshCutSurface.o.data.rel.ro._ZTIN4Foam14meshCutSu rfaceE[typeinfo for Foam::meshCutSurface]+0x8): undefined reference to `typeinfo for Foam::triSurface' Make/linuxGccDPOpt/meshCutSurface.o.data.rel.ro._ZTVN4Foam15orientedS urfaceE[vtable for Foam:rientedSurface]+0x10): undefined reference to `Foam::triSurface::movePoints(Foam::Field<Foam::Ve ctor<double> > const&)' Make/linuxGccDPOpt/meshCutSurface.o.data.rel.ro._ZTIN4Foam15orientedS urfaceE[typeinfo for Foam:rientedSurface]+0x8): undefined reference to `typeinfo for Foam::triSurface collect2: ld returned 1 exit status make: *** [OpenFOAM.out] Error 1 I think there is some bug in the timeVaryingUniformTotalPressure and timeVaryingUniformFixedValue. regards, Nishant |
|
July 23, 2009, 05:47 |
|
#2 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
type timeVaryingTotalPressure; instead (because that is the actual type-name specified in the source) Quote:
My bet is: there isn't |
|||
July 24, 2009, 12:50 |
is the format right?
|
#3 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Thanks for the help.
I would believe you here. However I can still see a folder in field folder with name timeVaryingUniformTotalPressure. I have tried as you said. but I am still having some issue. Sorry for bothering you but it is still giving some problems. My p file is formatted as: type timeVaryingTotalPressure; p0 uniform 100000.5; U U; phi phi; rho rho; psi none; gamma 1.4; value uniform 100000.5; timeDataFileName "inlet.dat"; where inlet.dat is the file from where I am reading the values. Is this the right format? I have tried with other BCs like timeVaryingUniformFixedValue as well. and they didn't really work for sonicFoam. I am recompiling the finieVolume folder with "wmake libso" option now. I hope this should be ok. But I am wondering why timeVaryingUniformFixedValue BC also didn't work?? That option used to work on 1.4.1 a few months ago. (since i was not working on BC from last few months!) However I can There is a folder in field folder with name timeVaryingUniformTotalPressure. regards, Nishant |
|
July 26, 2009, 16:09 |
|
#4 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
I even tried totalPressureTimeSeries. and I come across that even that option didn't work. I cant really figure out what is going wrong.
If you want my case file then i can provide it to you. regards, Nishant |
|
July 26, 2009, 16:46 |
|
#5 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
I am trying this BC with sonicFoam solver. I was wondering if the option of trying this solver with
rho rho; psi none; in timeVaryingUniformTotalPressure is ok or not?? regards Nishant |
|
July 26, 2009, 18:43 |
correct format
|
#6 |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Hi
I manage to find the right format. It has changed a lot from the 1.4.1 version. The correct format is: type timeVaryingTotalPressure; p0 100000.5; U U; phi phi; rho rho; psi none; gamma 1.4; value uniform 100000.5; outOfBounds clamps; fileName "inlet.dat"; Can anyone put some light on outOfBounds type? Other way could be to see the /lnInclude/interpolationTable.C file. regards, Nishant |
|
July 27, 2009, 06:17 |
|
#7 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Sure, the code needs to know how to handle cases where you've requested an interpolation time that is out-of-bounds (ie, which is not covered by your table). It can be an error. It can clamp to the upper/lower limits, with or without issuing a warning. Or it can repeat the table (ie, wrap around to the starting time) - this last one would be useful for example with engine data that is from 0-720 deg crank-angle, but repeats again for further engine cycles.
|
|
July 27, 2009, 10:17 |
|
#8 | |
Senior Member
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17 |
Quote:
thanks for the comment. I have few question to ask though. 1) How would the keyword clamp decide about the upper or lower limit? Do they clam keyword take the last in the table value as the clamping point? 2)How would repeat actually repeat the table. For example, i have a table time pressure 0.2 1000000 0.4 1000000.2 0.6 1000000.4 . . 1.4 1000001.4 If my simulation is starting from 0 and crosses the time 1.4 then wot will be the next value it will take? will it take the value of time at 0.2 sec for the time 1.6??? regards, Nishant |
||
July 27, 2009, 10:39 |
|
#9 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
It is much faster if you just take a look at the source src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C - this should quickly answer all of your questions.
BTW: I just noticed that you filed this under 'bugs', but it doesn't seem to be a bug report at all. Last edited by olesen; July 28, 2009 at 11:08. Reason: noticed it was misfiled udner bugs |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with cyclic boundaries in Openfoam 1.5 | fs82 | OpenFOAM | 36 | January 7, 2015 00:31 |
Cyclic Boundary Condition | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Running, Solving & CFD | 36 | July 2, 2012 12:23 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 02:34 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 08:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |