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

add solid region to interfoam which has energy eqn

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2020, 01:18
Smile add solid region to interfoam which has energy eqn
  #1
New Member
 
Ilhwan Yeo
Join Date: Jan 2020
Posts: 14
Rep Power: 2
jayson is on a distinguished road
Hello Foamers!
I am fairly newbie.. I want to simulate the combination of two phase flow and conjugate heat transfer. So, I now add solid region to interfoam which has energy equation.

I create the mesh for solid region and the fields for solid.
but I get error.. I think It is fairly correct code..

Foam::Info
<< "Create solid mesh for time ="
<< runTime.timeName() <<Foam::nl <<Foam::endl;

Foam::fvMesh solidMesh
(
Foam::IOobject
(
"wallRegion",
runTime.timeName(),
runTime,
Foam::IOobject::MUST_READ
)
);

Info<< "Reading solid thermophysical properties\n" <<endl;
autoPtr<solidThermo> wWallThermo(solidThermo::New(solidMesh));
solidThermo& wallThermo = wWallThermo();

Info<< "Adding to solidRho\n" <<endl;
volScalarField wallRho
(
IOobject
(
"solidRho",
runTime.timeName(),
solidMesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
wallThermo.rho()
);

Info<< "Adding to solild kappa\n" <<endl;
volScalarField wallK
(
IOobject
(
"solidK",
runTime.timeName(),
solidMesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
wallThermo.Kappa()
);

Info<< "Adding to solidcp\n" <<endl;
volScalarField wallcp
(
IOobject
(
"solidcp",
runTime.timeName(),
solidMesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
wallThermo.Cp()
);


Info<< "solve solid TEqn" << endl;
{
wallRho = wallThermo.rho();
wallK = wallThermo.kappa();
wallcp = wallThermo.Cp();

fvScalarMatrix TEqn
(
fvm::ddt(wallRho*wallcp, T)
-fvm::laplacian(wallK, T)
);

TEqn.relax();

TEqn.solve();

wallThermo.correct();

Info<< "Min/max solid T:" << min(wallThermo.T()).value() << ' '
<< max(wallThermo.T()).value() << endl;

}


/solid/createSolidFields.H: In function ‘int main(int, char**)’:
./solid/createSolidFields.H:31:1: error: no matching function for call to ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject, Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh> >)’
);
jayson is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum number of iterations exceeded chtmultiregionsimpleFoam Moncef OpenFOAM Running, Solving & CFD 28 July 13, 2020 15:26
Negative initial temperature error (chtMultiRegionFoam) jebin OpenFOAM Pre-Processing 59 March 26, 2020 13:36
alphat Wien3 OpenFOAM Running, Solving & CFD 22 August 15, 2019 11:00
p_rgh initial residual no change with different settings manuc OpenFOAM Running, Solving & CFD 3 June 26, 2018 16:53
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45


All times are GMT -4. The time now is 17:12.