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

Pyrolysis Model - Thermal Conductivity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2021, 10:52
Default Pyrolysis Model - Thermal Conductivity
  #1
Member
 
Join Date: Feb 2018
Posts: 91
Rep Power: 8
charles4allme is on a distinguished road
Hello,

I have this new conduction equation and I was wondering how to insert it into OpenFOAM

Code:
pcdT/dt = d/dx(kdT/dx) with k = keff if x< du or k = k if x> du
I have also attached the equation with the diagram of the problem. I do not know how to create the condition in my pyrolysis model with the new thermal conductivity.

I appreciate the assistance.
Attached Images
File Type: png Heat Equation.PNG (15.9 KB, 10 views)
File Type: png Drawing.PNG (46.1 KB, 16 views)
charles4allme is offline   Reply With Quote

Old   April 15, 2021, 17:10
Default
  #2
Member
 
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 8
SHUBHAM9595 is on a distinguished road
The Equation can be written as follow in a new file TEqn.H....This file can be created in solver directory using touch TEqn.H

Code:
	fvScalarMatrix TEqn
    (
        fvm::ddt(T) == fvm::laplacian(alphat, T)
     );

TEqn.solve();
But before this we have to define alphat as
Code:
tmp <volScalarField> alphat = K/(rho*cp);
Now as k is dependent on vertical length, we need to access that coordinate using
Code:
const fvMesh& mesh = U.mesh();
volScalarField Ycord = mesh.C().component(vector::Y);// assuming Y is the vertical

	 forAll(K,celli)
{
		if (Ycord[celli] <= DU.value())
	
		{
			K[celli] = Keff.value()/(rho.value()*cp.value());
		}
		else
		{
			K[celli] = K2.value()/(rho.value()*cp.value());;
		}

}
And finally we have to intialise all the additional variables in createFields.H as
Code:
    // Density
    dimensionedScalar rho(transportProperties.lookup("rho"));
    
    // sPECIFIC HEAT
    dimensionedScalar cp(transportProperties.lookup("cp"));

    // Threshold vertical length 
    dimensionedScalar DU(transportProperties.lookup("DU"));
    
      // Keff
    dimensionedScalar Keff(transportProperties.lookup("Keff"));
    
      // K2
    dimensionedScalar K2(transportProperties.lookup("K2"));

 Info<< "Reading field Thermal Conductivity \n" << endl;
volScalarField K
(
    IOobject
    (
        "K",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);
Finally, include "TEqn.H" in your "customFoam.C" file within runtime loop
SHUBHAM9595 is offline   Reply With Quote

Old   May 24, 2021, 09:05
Default
  #3
Member
 
Join Date: Feb 2018
Posts: 91
Rep Power: 8
charles4allme is on a distinguished road
Hi SHUBHAM9595,

Thanks a lot for your reply. It has truly been helpful
charles4allme 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
user defined mixing law for thermal conductivity Weiqiang Liu FLUENT 2 June 26, 2020 07:23
effective thermal conductivity and mass weighted thermal conductivity Weiqiang Liu FLUENT 8 June 19, 2020 00:08
Question about anisotropic thermal conductivity Szweyk STAR-CCM+ 2 June 30, 2016 08:26
Effective thermal conductivity in Full Porous Model Ev Fa CFX 0 February 2, 2016 07:16
Compression stoke is giving higher pressure than calculated nickjuana CFX 62 May 19, 2015 13:32


All times are GMT -4. The time now is 03:53.