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

Create a new face-flux field for energy equation

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By ghas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2015, 11:45
Smile Create a new face-flux field for energy equation
  #1
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Hi friends,

I want to add a new face-flux field to openfoam solver.

I impliment below code but it has error.

surfaceScalarField phiEnergy
(
IOobject
(
"phiEnergy",
runTime.timeName(),
mesh
),
rho*Cp*(mesh.Sf() & fvc::interpolate(U))
);

fvScalarMatrix TEqn
(
fvm::ddt(rho,T)
+ fvm::div(phiEnergy,T)
- fvm::laplacian(K,T)
);

please Help me
rapierrz is offline   Reply With Quote

Old   April 28, 2015, 03:10
Default
  #2
New Member
 
JOMAA Ghassan
Join Date: Jan 2012
Location: Paris
Posts: 8
Rep Power: 14
ghas is on a distinguished road
Hi,

It didn't work because you have tried to multiply a volScalarField (rho*Cp) by a surfaceScalarField (mesh.Sf() & fvc::interpolate(U)).

To resolve the problem, you can define the face-flux as:

surfaceScalarField phiEnergy
(
IOobject
(
"phiEnergy",
runTime.timeName(),
mesh
),
(mesh.Sf() & fvc::interpolate(rho*Cp*U))
);

Best regards,

Ghassan
wenxu and rapierrz like this.
ghas is offline   Reply With Quote

Old   April 28, 2015, 11:39
Default
  #3
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Thank you Ghassan,

it's work correctly.
rapierrz is offline   Reply With Quote

Reply


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[ICEM] Error in mesh writing helios ANSYS Meshing & Geometry 21 August 19, 2021 14:18
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36


All times are GMT -4. The time now is 09:49.