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

Accessing sauter diameter defined in createFieldsH

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2008, 11:33
Default I have a sauter mean diameter
  #1
New Member
 
Mateusz Slowikowski
Join Date: Mar 2009
Location: Waterloo, Canada
Posts: 12
Rep Power: 17
mateusz_slowikowski is on a distinguished road
I have a sauter mean diameter defined in the createFields.H file:

volScalarField d32_
(
IOobject
(
"d32",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
phasea->d()*alpha
);

{
volScalarField d32_temp = scalar(0.0)/d32_;
for (int k = 0; k<N_Bins; k++)
{
d32_temp += popBal->binVolume(k) * (*n_[k]) / phasea->d() / (Foam::pow( 2, (N_Bins - scalar(k-1)) / 3));
}
d32_ = scalar(1.0)/d32_temp;
}

and I want to access it in the kinetic theory model:

Foam::kineticTheoryModel::kineticTheoryModel
([...vars passed in...]):
...
da_ ((*(phasea.U())).DB().lookupObject<const> ("d32")),
...

However, I keep on getting these error:

kineticTheoryModel/kineticTheoryModel.C:51: error: âclass Foam::tmp<foam::geometricfield<foam::tensor<double >, Foam::fvPatchField, Foam::volMesh> >â has no member named âDBâ
kineticTheoryModel/kineticTheoryModel.C:51: error: expected primary-expression before âconstâ

I'm not sure how to correctly write the syntax...
mateusz_slowikowski is offline   Reply With Quote

Old   March 10, 2008, 11:40
Default the line da_ (phasea.U().DB
  #2
New Member
 
Mateusz Slowikowski
Join Date: Mar 2009
Location: Waterloo, Canada
Posts: 12
Rep Power: 17
mateusz_slowikowski is on a distinguished road
the line

da_ (phasea.U().DB().lookupObject<const> ("d32")),

solves it
mateusz_slowikowski 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
Hydraulic diameter OFXJ FLUENT 1 September 30, 2008 01:56
particle diameter newbie FLUENT 0 June 12, 2008 15:41
udf - droplet diameter bohis FLUENT 3 April 8, 2008 04:38
particle diameter (user defined function) eulerian nasser FLUENT 0 June 18, 2006 04:39
Droplet diameter Habib Siemens 1 June 25, 2005 01:18


All times are GMT -4. The time now is 06:44.