CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

Error with timeVaryingUniformTotalPressure and timeVaryingUniformFixedValue patch

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 22, 2009, 17:04
Default Error with timeVaryingUniformTotalPressure and timeVaryingUniformFixedValue patch
  #1
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 165
Rep Power: 8
nishant_hull is on a distinguished road
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
nishant_hull is offline   Reply With Quote

Old   July 23, 2009, 05:47
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by nishant_hull View Post
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.

Try in p

type timeVaryingTotalPressure;

instead (because that is the actual type-name specified in the source)

Quote:
Originally Posted by nishant_hull View Post
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'm not quite sure what you're trying to compile here. Did you try to compile the finiteVolume-library with "wmake"? (that would explain the undefined references) It's a library and therefore should be compiled with "wmake libso"

Quote:
Originally Posted by nishant_hull View Post
I think there is some bug in the timeVaryingUniformTotalPressure and timeVaryingUniformFixedValue.

regards,
Nishant
My bet is: there isn't
gschaider is offline   Reply With Quote

Old   July 24, 2009, 12:50
Default is the format right?
  #3
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 165
Rep Power: 8
nishant_hull is on a distinguished road
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
nishant_hull is offline   Reply With Quote

Old   July 26, 2009, 16:09
Default
  #4
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 165
Rep Power: 8
nishant_hull is on a distinguished road
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
nishant_hull is offline   Reply With Quote

Old   July 26, 2009, 16:46
Default
  #5
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 165
Rep Power: 8
nishant_hull is on a distinguished road
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
nishant_hull is offline   Reply With Quote

Old   July 26, 2009, 18:43
Default correct format
  #6
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 165
Rep Power: 8
nishant_hull is on a distinguished road
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
nishant_hull is offline   Reply With Quote

Old   July 27, 2009, 06:17
Default
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by nishant_hull View Post
Can anyone put some light on outOfBounds type?
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.
olesen is offline   Reply With Quote

Old   July 27, 2009, 10:17
Default
  #8
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 165
Rep Power: 8
nishant_hull is on a distinguished road
Quote:
Originally Posted by olesen View Post
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.
Hi olesen,

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
nishant_hull is offline   Reply With Quote

Old   July 27, 2009, 10:39
Default
  #9
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by nishant_hull View Post
thanks for the comment. I have few question to ask though.
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
olesen is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 37 January 7, 2015 01: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 03:34
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 04:41.