|
[Sponsors] |
Very basic problem with surfaceScalarField definition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 7, 2011, 05:31 |
Very basic problem with surfaceScalarField definition
|
#1 |
Member
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15 |
Dear Foamers,
I am realy stuck with very simple problem. I am intersted in definition new surfaceScalarField which will correspond to to the flux of new variable phitag. I want to do it within my own function by this way: #include "surfaceInterpolationScheme.H" #include "linear.H" #include "fvCFD.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void MV(volVectorField*FunU,volScalarField*FunV, volVectorField*ResU, volVectorField*ResV, const fvMesh&mesh ) { surfaceScalarField phitag ( IOobject ( "phitag", mesh.time(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), linearInterpolate(FunU) & mesh.Sf() ); } The compilation results in error related with mesh.time() and with linearInterpolate . Namely : no matching function for call to 'linearInterpolate(Foam::volVectorField*&)' Any suggestions please, Yuri |
|
December 7, 2011, 10:09 |
|
#2 |
Senior Member
Steven van Haren
Join Date: Aug 2010
Location: The Netherlands
Posts: 149
Rep Power: 16 |
Maybe try:
Code:
linearInterpolate(&FunU) & mesh.Sf() How are you going to use this piece of code? |
|
December 7, 2011, 10:16 |
|
#3 |
Disabled
Join Date: Mar 2011
Posts: 174
Rep Power: 15 |
Have you tried this?
Code:
fvc::interpolate(FunU) & mesh.Sf() EDIT: Sorry, didn't see the pointer. |
|
December 7, 2011, 21:11 |
|
#4 |
Member
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15 |
Thank you for you help,
the code is compiled by changing to linearInterpolate(*FunU) & mesh.Sf() Now the problem is what to do with mesh.time() If remove the line the code is passing compilation but it is not clear for me what the constructor takes by deffault. Does anybody know where I can look at comprehensive description of IOobject constructor to understand how it works. |
|
December 8, 2011, 14:13 |
|
#5 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Look at the OF source docs online (http://www.openfoam.com/docs/cpp/), and search for IOobject. This will give you everything you want to know about this class (as well as any others you care to search for).
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
basic fluid flow problem - is there a way to switch pressure to a flow rate in analyt | vlnikolic | Main CFD Forum | 3 | September 16, 2016 05:07 |
Can I solve this problem by Fluent? | Kai_kc | FLUENT | 1 | October 27, 2010 06:29 |
Basic Comsol CAD Problem | Sapo | COMSOL | 0 | August 27, 2010 15:58 |
Multiphase region definition problem | Shahed | CFX | 6 | August 16, 2010 04:33 |
Specious transport (mixture definition problem) | MASOUD | FLUENT | 0 | June 8, 2010 00:34 |