CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   programing problem: autoPtr<incompressible::RASModel> ... (https://www.cfd-online.com/Forums/openfoam-solving/114343-programing-problem-autoptr-incompressible-rasmodel.html)

adambarfi March 9, 2013 12:01

programing problem: autoPtr<incompressible::RASModel> ...
 
Hi everybody,

I want to know what is the role of autoPtr<..::..> and what should I place in <..::..> and how can I find out the arrangement of it?

here is a example (buoyantBoussinesqSimpleFoam solver):

Code:

    singlePhaseTransportModel laminarTransport(U, phi);
   
    autoPtr<incompressible::RASModel> turbulence
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );

I find in OpenFOAM/OpenFOAM-2.1.0/src/turbulenceModels/incompressible/turbulenceModel and at turbulenceModel.C the following:

Code:

autoPtr<turbulenceModel> turbulenceModel::New
(
    const volVectorField& U,
    const surfaceScalarField& phi,
    transportModel& transport,
    const word& turbulenceModelName
)

and

Code:

    return autoPtr<turbulenceModel>
    (
        cstrIter()(U, phi, transport, turbulenceModelName)
    );

but how can I understand what should I write in < >???????

I'm using viscoelasticFluidFoam and I'm trying to read some parameter from OpenFOAM/OpenFOAM-2.1.0/src/transportModels/viscoelastic/viscoelasticLaws/Giesekus, the Giesekus.C file.

when I see the buoyantBoussinesqSimpleFoam solver, I thought that the key is the autoPtr but How???

please help me!
any hints or tips appreciated.

Thanks,
Mostafa

Fengwei June 3, 2013 10:54

http://www.cfd-online.com/Forums/ope...g-autoptr.html i hope this maybe give you some help


All times are GMT -4. The time now is 11:41.