|
[Sponsors] |
Problem declaring PtrList<autoPtr<phaseChangeTwoPhaseMixture> > |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 17, 2014, 18:43 |
Problem declaring PtrList<autoPtr<phaseChangeTwoPhaseMixture> >
|
#1 |
Member
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 15 |
Hi,
Does anyone have experience combining chtMultiRegionFoam with InterPhaseChangeFoam? Following outlines what I have done so far: 1. replace the source codes within chtMultiRegionFoam/fluid with the source codes from interPhaseChangeFoam 2. change interPhaseChangeFoam.C to solveFluid.C and cleaned up some header and makefile entries 3. In createFluidFields.H I have: Code:
PtrList<volScalarField> p_rghFluid(fluidRegions.size()); PtrList<volVectorField> UFluid(fluidRegions.size()); PtrList<surfaceScalarField> phiFluid(fluidRegions.size()); PtrList<autoPtr<phaseChangeTwoPhaseMixture> > twoPhasePropertiesFluid(fluidRegions.size()); PtrList<volScalarField> rhoFluid(fluidRegions.size()); forAll(fluidRegions, i) { Info<<"Reading field p_rgh\n" <<endl; p_rghFluid.set ( i, new volScalarField ( IOobject ( "p_rgh", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) ); //define other fields as needed Code:
fvMesh& mesh = fluidRegions[i]; pimpleControl pimple(mesh); volScalarField& p_rgh = p_rghFluid[i]; volVectorField& U = UFluid[i]; surfaceScalarField& phi = phiFluid[i]; autoPtr<phaseChangeTwoPhaseMixture> twoPhaseProperties = twoPhasePropertiesFluid[i]; volScalarField& alpha1 = twoPhaseProperties->alpha1(); volScalarField& alpha2 = twoPhaseProperties->alpha2(); const dimensionedScalar rho1 = twoPhaseProperties->rho1(); const dimensionedScalar rho2 = twoPhaseProperties->rho2(); volScalarField& rho = rhoFluid[i]; Code:
In file included from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/tmp.H:143:0, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/PtrListI.H:29, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/PtrList.H:321, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/List.C:30, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/List.H:259, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/labelList.H:48, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/UPstream.H:43, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/Pstream.H:42, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/parRun.H:35, from /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/finiteVolume/lnInclude/fvCFD.H:4, from chtMultiRegionInterFoam.C:37: /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/tmpI.H: In destructor ‘Foam::tmp<T>::~tmp() [with T = Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>]’: ./fluid/createFluidFields.H:83:5: instantiated from here /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/tmpI.H:108:9: error: ‘class Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>’ has no member named ‘okToDelete’ /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/tmpI.H:115:13: error: ‘class Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>’ has no member named ‘operator--’ /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/tmpI.H: In member function ‘T* Foam::tmp<T>::ptr() const [with T = Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>]’: /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/PtrListI.H:116:47: instantiated from ‘Foam::autoPtr<T> Foam::PtrList<T>::set(Foam::label, const Foam::tmp<T>&) [with T = Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>, Foam::label = int]’ ./fluid/createFluidFields.H:83:5: instantiated from here /home/gandalf/OpenFOAM/OpenFOAM-2.2.x/src/OpenFOAM/lnInclude/tmpI.H:159:10: error: ‘class Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>’ has no member named ‘resetRefCount’ Code:
In createFluidFields.H PtrList<phaseChangeTwoPhaseMixture> twoPhasePropertiesFluid(fluidRegions.size()); and setRegionFluidFields.H phaseChangeTwoPhaseMixture& twoPhaseProperties = twoPhasePropertiesFluid[i]; Code:
interfaceProperties interface(alpha1, U, twoPhaseProperties()); autoPtr<incompressible::turbulenceModel> turbulence ( incompressible::turbulenceModel::New(U, phi, twoPhaseProperties()) ); Does anyone have any suggestions related to how I can go about solving this problem. Thanks for your helps in advance! Regards, Jace |
|
August 16, 2015, 17:22 |
|
#2 |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 13 |
Did you already find the solution for this issue?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
area does not match neighbour by ... % -- possible face ordering problem | St.Pacholak | OpenFOAM | 10 | February 7, 2024 21:50 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Problem in implementing cht | tilek | CFX | 3 | May 8, 2011 08:39 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |