CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   ConjugateInterHeatFoam in OF.1.6-ext..need help to fix the error!!! (https://www.cfd-online.com/Forums/openfoam/96856-conjugateinterheatfoam-1-6-ext-need-help-fix-error.html)

farhagim February 2, 2012 19:02

ConjugateInterHeatFoam in OF.1.6-ext..need help to fix the error!!!
 
Hello Guys,

I modified the conjugateHeatFoam solver in OF.1.6-ext to couple my interHeatFoam solver with solid part. I managed to compiled the solver without problem. But When I am trying to run it in a case of droplet impact on hot surface, it shows me this error:
*******************
Create time

Create mesh for time = 0

// using new solver syntax:
T
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}

Reading transportProperties

Reading field pd

Reading field alpha1

Reading field U

Reading field T

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Reading / calculating rho*cp

Reading / calculating rho*phi*cp


Reading g
Calculating field g.h



--> FOAM FATAL ERROR:
LHS and RHS of + have different dimensions
dimensions : [0 2 -2 0 0 0 0] + [1 -1 -2 0 0 0 0]


From function operator+(const dimensionSet& ds1, const dimensionSet& ds2)
in file dimensionSet/dimensionSet.C at line 408.

FOAM aborting

Aborted
***********************
I think this error comes from CreateField file, So I bring it here for you guys to see if any parts of it need to be fixed.
Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);

Info<< "Reading field pd\n" << endl;
volScalarField pd
(
IOobject
(
"pd",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);


Info<< "Reading field alpha1\n" << endl;
volScalarField alpha1
(
IOobject
(
"alpha1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

Info << "Reading field T\n" << endl;
volScalarField T
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);


# include "createPhi.H"





Info<< "Reading transportProperties\n" << endl;
twoPhaseThermalMixture twoPhaseProperties(U, phi);

const dimensionedScalar& rho1 = twoPhaseProperties.rho1();
const dimensionedScalar& rho2 = twoPhaseProperties.rho2();

const dimensionedScalar& cp1 = twoPhaseProperties.cp1();
const dimensionedScalar& cp2 = twoPhaseProperties.cp2();


// Need to store rho for ddt(rho, U)
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT
),
alpha1*rho1 + (scalar(1) - alpha1)*rho2,
alpha1.boundaryField().types()
);
rho.oldTime();


// Mass flux
// Initialisation does not matter because rhoPhi is reset after the
// alpha1 solution before it is used in the U equation.
surfaceScalarField rhoPhi
(
IOobject
(
"rho*phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
rho1*phi
);

// Need to store rho*Cp for ddt(rho*Cp, T)
// Initialisation does not matter because rhoCp is reset after the
// gamma solution before it is used in the T equation.
Info<< "Reading / calculating rho*cp\n" << endl;
volScalarField rhoCp
(
IOobject
(
"rho*Cp",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
alpha1*rho1*cp1 + (scalar(1) - alpha1)*rho2*cp2,
alpha1.boundaryField().types()
);
rhoCp.oldTime();

// Energy flux
// Initialisation does not matter because rhoPhiCp is reset after the
// gamma solution before it is used in the T equation.
Info<< "Reading / calculating rho*phi*cp\n" << endl;
surfaceScalarField rhoPhiCp
(
IOobject
(
"rho*phi*cp",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
rhoPhi*cp1
);


#include "readGravitationalAcceleration.H"


Info<< "Calculating field g.h\n" << endl;
volScalarField gh("gh", g & mesh.C());
surfaceScalarField ghf("ghf", g & mesh.Cf());

volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
pd + rho*gh
);

label pdRefCell = 0;
scalar pdRefValue = 0.0;
setRefCell(pd, mesh.solutionDict().subDict("PISO"), pdRefCell, pdRefValue);

scalar pRefValue = 0.0;

if (pd.needReference())
{
pRefValue = readScalar
(
mesh.solutionDict().subDict("PISO").lookup("pRefVa lue")
);

p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pdRefCell)
);
}

// Construct interface from alpha1 distribution
interfaceProperties interface(alpha1, U, twoPhaseProperties);

// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, twoPhaseProperties)
);

# include "attachPatches.H"

******************************

Please help me to fix this problem.

Thanks,

Mehran


All times are GMT -4. The time now is 20:48.