CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

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

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 2, 2012, 20:02
Default ConjugateInterHeatFoam in OF.1.6-ext..need help to fix the error!!!
  #1
Member
 
Join Date: Nov 2009
Posts: 48
Rep Power: 7
farhagim is on a distinguished road
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

Last edited by farhagim; February 6, 2012 at 13:56.
farhagim is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Accessing phi from a fvPatchField at same patch johndeas OpenFOAM 1 September 13, 2010 21:23
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 19:54
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
user defined function cfduser CFX 0 April 29, 2006 11:58


All times are GMT -4. The time now is 07:32.