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

Modified diameterModel does not change diameters - help required in troubleshooting

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2015, 12:49
Default Modified diameterModel does not change diameters - help required in troubleshooting
  #1
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 11
anuragm is on a distinguished road
Hello everyone,

I need to implement a custom diameter model in the multiphaseEulerFoam solver. For this purpose, I modified the isothermalDiameter model in the following fashion.

The following variables were declared in the header file:
Code:
    // Private data

        //- Reference diameter of the phase
        volScalarField d_;

        //- Initial number of particles
        dimensionedScalar No_;

        //- Initial global dispersed void fraction
        dimensionedScalar Vo_;

        //- Number assigned to the phase
        dimensionedScalar pNum_;
These variables were initialized in the constructor as follows:
Code:
    diameterModel(dict, phase),
    d_
    (
        IOobject
        (
            IOobject::groupName("d", phase.name()),
            phase.time().timeName(),
            phase.db(),
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        phase.mesh()
    ),
    No_("No", dimless/dimVol, dict_.lookup("No")),
    Vo_("Vo", dimless, dict_.lookup("Vo")),
    pNum_("pNum", dimless, dict_.lookup("pNum"))
And finally, the function d() was modified in the following fashion:
Code:
Foam::tmp<Foam::volScalarField> Foam::diameterModels::DQMOM::d() const
{
    scalar oneDivThree = 1.0/3.0;
    const dimensionedScalar& CC 
      = Foam::pow( 6.0 * Vo_ / constant::mathematical::pi / No_, oneDivThree );
            
    label n = pNum_.value();
    word fieldName = "ABSC" + Foam::name(n);
    const volScalarField& absc 
      = phase_.db().lookupObject<volScalarField>(fieldName);

    return CC * Foam::pow(absc, oneDivThree);
}
The compilation completed without errors but when I select this model for the dispersed phase and execute my simulation, I get no change in the diameter for any of the dispersed phases.
anuragm is offline   Reply With Quote

Old   July 22, 2015, 08:04
Default
  #2
Member
 
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 11
anuragm is on a distinguished road
I forgot to add that the volScalarfield variables ABSC1/ABSC2/ABSC3 are non-uniform and change with time (verified by my simulation results). However, the diameter field does not get changed at all despite the fact that the value returned by the function d() depends on ABSC1/ABSC2/ABSC3
anuragm 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
wmake error zxj160 OpenFOAM 0 March 26, 2012 10:52
paraview installation woes vex OpenFOAM Installation 15 January 30, 2011 07:11
[OpenFOAM] Problem with paraFoam on a linux-64 bit bunni ParaView 4 April 14, 2010 20:55
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 21:41


All times are GMT -4. The time now is 05:26.