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

define volscalarfield

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By nimasam

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 19, 2013, 02:57
Default define volscalarfield
  #1
Member
 
v
Join Date: Nov 2011
Posts: 33
Rep Power: 14
vahidzanganeh is on a distinguished road
hi foamers
i have to want a volumetric heat transfer coefficient defined in my new solver.
i have the following:
volScalarField Hv
(
IOobject
(
"Hv",
runTime.timeName(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar
(
"Hv",
dimensionSet(1, -1, -3, -1, 0, 0, 0),
10000.0
)
);
forAll(mesh.C(),i)
{
Hv[i] = ((Nuseltv[i]*thermo.alpha()[i] * thermo.Cp())/pow(porousdim,2));
}
__________________________
comment:
alpha is volscalarfield
Cp is volscalarfield
porousdim is dimeter: defined in constant folder
porousdim porousdim [0 1 0 0 0 0 0] 0.00083;
---------------------------------------------------
The following error is generated executable file
*************************
parameter.H: In function ‘int main(int, char**)’:
parameter.H:98: error: cannot convert ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ to ‘double’ in assignment
**************************************
line 98 is : Hv[i] = ((Nuseltv[i]*thermo.alpha()[i] * thermo.Cp())/pow(porousdim,2));
******************************
who can help me?
best regards
vahidzanganeh is offline   Reply With Quote

 


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
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 1 May 19, 2020 21:13
Installing OF 1.6 on Mac OS X gschaider OpenFOAM Installation 129 June 19, 2010 09:23
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
UDF FOR UNSTEADY TIME STEP mayur FLUENT 3 August 9, 2006 10:19


All times are GMT -4. The time now is 14:22.