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

Very basic problem with surfaceScalarField definition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2011, 05:31
Default Very basic problem with surfaceScalarField definition
  #1
Member
 
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15
feldy77 is on a distinguished road
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
feldy77 is offline   Reply With Quote

Old   December 7, 2011, 10:09
Default
  #2
Senior Member
 
Steven van Haren
Join Date: Aug 2010
Location: The Netherlands
Posts: 149
Rep Power: 16
stevenvanharen is on a distinguished road
Maybe try:

Code:
linearInterpolate(&FunU) & mesh.Sf()
It looks like there is some problem with the fact that you pass a pointer to the function?

How are you going to use this piece of code?
stevenvanharen is offline   Reply With Quote

Old   December 7, 2011, 10:16
Default
  #3
Disabled
 
Join Date: Mar 2011
Posts: 174
Rep Power: 15
anon_a is on a distinguished road
Have you tried this?

Code:
fvc::interpolate(FunU) & mesh.Sf()
You can find something similar for phi in some solvers.

EDIT: Sorry, didn't see the pointer.
anon_a is offline   Reply With Quote

Old   December 7, 2011, 21:11
Default
  #4
Member
 
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15
feldy77 is on a distinguished road
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.
feldy77 is offline   Reply With Quote

Old   December 8, 2011, 14:13
Default
  #5
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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).
mturcios777 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 16:24.