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

Solid Thermal Conductivity as a function of temperature

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Daniel_Khazaei
  • 1 Post By Daniel_Khazaei

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2019, 05:05
Default Solid Thermal Conductivity as a function of temperature
  #1
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Hello Foamers,
Currently, I'm building a 1D mathematical model for simulating the coal pyrolysis. I would like to define the expression for solid thermal conductivity (K) as a function of temperature in the following location (below),
~/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/solid/transport

The expression is defined as follows:
Quote:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
const scalar T
) const
{
if (T < 773) //STEP 1
{
return ((1-pT_)*(0.0139*pow(T,0.5)) + (pT_*0.000496*T) + (pi_*0.0000000000342)*pow(T,3) + (px_*0.00000000228)*pow(T,3));
}
else if (T > 773) //STEP 2
{
pii=(pR_*(1-pT_))/(1-pR_);
pxx=1-((1-pT_)/(1-pR_));
pRR=(pii/(1-pxx));
pTT=pii+pxx;
return ((1-pTT)*(0.0139*pow(T,0.5)) + (pTT*0.000496*T) + (pii*0.0000000000342)*pow(T,3) + (pxx*0.00000000228)*pow(T,3));
pRR=pR_; //pRR should be Iterated back as variable pR_
pTT=pT_; //pTT should be Iterated back as variable pT_
}
}
In the above coding, the variables pT_ pi_ px_ pR_ are given as input (which are clearly declared), whereas, pii, pxx, pRR, pTT (not input variables) are iterated within the loop, so I don't know how to declare such variables in this circumstance.

During step 1 execution, there is no compilation errors. But as expected, after compiling step 2, I got the following errors:
Quote:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H: In member function ‘Foam::scalar Foam::conductivitySolidTransport<thermo>::K(Foam:: scalar) const’:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:138:3: error: ‘pii’ was not declared in this scope
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:139:3: error: ‘pxx’ was not declared in this scope
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:140:3: error: ‘pRR’ was not declared in this scope
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:141:3: error: ‘pTT’ was not declared in this scope
On the whole, I want to know how the iterating variables [pii, pxx, pRR, pTT] ~ need to be declared here and iterated accordingly.

Kindly give some insight view about this topic, which will be highly helpful for my research.
Thank you

Last edited by Kummi; May 16, 2019 at 03:37.
Kummi is offline   Reply With Quote

Old   May 14, 2019, 23:00
Default
  #2
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Can someone share their ideas please ?
Kummi is offline   Reply With Quote

Old   May 15, 2019, 09:25
Default Solid thermal conductivity as a function of temperature
  #3
New Member
 
Dinesh
Join Date: Jun 2018
Posts: 15
Rep Power: 8
DineshMyilsamy is on a distinguished road
Hello,
Your question s more related to C++ I guess. However, it can solved appropriately.

I am new to use OpenFOAm, so I have some basic questions ~ don't mind it please
1) Will foamers answer questions related to programming here as caption implies "Programming & Development" - because I have only basic knowledge in C++
2) Is there any other user friendly forum, where I can discuss my queries related to C++ (sometimes even simple questions)

Sorry to ask too many questions, because I am keep exploring to solve my problems in all possible ways.
Thank you
DineshMyilsamy is offline   Reply With Quote

Old   May 16, 2019, 01:55
Default
  #4
New Member
 
prabhakaran
Join Date: Aug 2018
Location: southkorea
Posts: 9
Rep Power: 8
prabhakaran is on a distinguished road
Dear Kummi,
Your question seems to be quite thoughtful.

As mentioned in the location (thermophysicalModels -> solid -> transport), seems only input variables can be called and fitted in the main equation appropriately.

Looks there is no clue to declare iterating variables in this thermophysical model section. But sure, there might be some other way to goooooo....
Hope, it will be a good topic of discussion if someone help you out here and will help for future foamers too.
prabhakaran is offline   Reply With Quote

Old   May 16, 2019, 03:13
Default
  #5
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by Kummi View Post
Can someone share their ideas please ?

Can you post the complete code structure?
Because from the code snippets I can't see where you have defined [pii, pxx, pRR, pTT]...
Daniel_Khazaei is offline   Reply With Quote

Old   May 16, 2019, 03:41
Default
  #6
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Quote:
Originally Posted by Daniel_Khazaei View Post
Can you post the complete code structure?
Because from the code snippets I can't see where you have defined [pii, pxx, pRR, pTT]...

Hi Mr. Daniel,

First of all, thanks for the reply. I am hereby attaching the files of the code structure located in ~/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/solid/transport.
Kindly check it.
Thank you
Attached Files
File Type: gz conductivity.tar.gz (1.9 KB, 11 views)
Kummi is offline   Reply With Quote

Old   May 16, 2019, 03:59
Default
  #7
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by Kummi View Post
Hi Mr. Daniel,

First of all, thanks for the reply. I am hereby attaching the files of the code structure located in ~/OpenFOAM/OpenFOAM-2.1.1/src/thermophysicalModels/solid/transport.
Kindly check it.
Thank you
As I have stated before, you haven't defined your variables:

Code:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
    const scalar T
) const
{
    if (T < 773) //STEP 1
    {
    return ((1-pT_)*(0.0139*pow(T,0.5)) + (pT_*0.000496*T) + (pi_*0.0000000000342)*pow(T,3) + (px_*0.00000000228)*pow(T,3));
    }
    else if (T > 773) //STEP 2
    {
    scalar pii = (pR_*(1-pT_))/(1-pR_);
    scalar pxx = 1-((1-pT_)/(1-pR_));
    scalar pRR = (pii/(1-pxx));
    scalar pTT= pii + pxx;

    return ((1-pTT)*(0.0139*pow(T,0.5)) + (pTT*0.000496*T) + (pii*0.0000000000342)*pow(T,3) + (pxx*0.00000000228)*pow(T,3));
    }
}
in c++ when you need to use a new variable, you should first declare (optional initialize) that variable:

Code:
pii = (pR_*(1-pT_))/(1-pR_);
to:

Code:
scalar pii = (pR_*(1-pT_))/(1-pR_);
I have also removed these two lines as I don't understand what they are supposed to do after a return statement! return will get you out of that function and those two lines are useless.

Code:
    pRR=pR_; //pRR should be Iterated back as variable pR_
    pTT=pT_; //pTT should be Iterated back as variable pT_
And one important note, never work inside OpenFOAM/src folder if you are not familiar with OpenFOAM structure. There are plenty of tutorials out there showing you how to make you new library based OpenFOAM source code without touching the main codes.
Kummi likes this.
Daniel_Khazaei is offline   Reply With Quote

Old   May 16, 2019, 04:43
Default
  #8
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Quote:
Originally Posted by Daniel_Khazaei View Post
[CODE]
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
const scalar T
) const
{
if (T < 773) //STEP 1
{
return ((1-pT_)*(0.0139*pow(T,0.5)) + (pT_*0.000496*T) + (pi_*0.0000000000342)*pow(T,3) + (px_*0.00000000228)*pow(T,3));
}
else if (T > 773) //STEP 2
{
scalar pii = (pR_*(1-pT_))/(1-pR_);
scalar pxx = 1-((1-pT_)/(1-pR_));
scalar pRR = (pii/(1-pxx));
scalar pTT= pii + pxx;

return ((1-pTT)*(0.0139*pow(T,0.5)) + (pTT*0.000496*T) + (pii*0.0000000000342)*pow(T,3) + (pxx*0.00000000228)*pow(T,3));
}
}
Dear Mr. Daniel,
Thank you for sharing your knowledge. Its highly helpful.
Quote:
in c++ when you need to use a new variable, you should first declare (optional initialize) that variable:
As you mentioned, I have declared my variable and it is compiled successfully.
Quote:
And one important note, never work inside OpenFOAM/src folder if you are not familiar with OpenFOAM structure.
For Foamers simple understanding, I mentioned [OpenFOAM/src folder] this location. However, I have created my own platform for working. Thank you once again !!


For T<773K ==> The flow is solved with respect to input variables!!
For T>773K ==> The flow is iterated continuously (within else if loop) where the calculated variables pRR and pTT should replace the value of the variables pR and pT for next iteration (followed by simultaneous calculation).
Thats why, I have mentioned as,
Quote:
pRR =pR_; //pRR should be Iterated back as variable pR_
pTT=pT_; //pTT should be Iterated back as variable pT_
==> The last two lines are mentioned with the intention that the calculated value of pRR should replace the value of pR in next iteration within if-else loop (T>773K) and vice-versa.


Could you please assist me with it?

Last edited by Kummi; May 16, 2019 at 06:08.
Kummi is offline   Reply With Quote

Old   May 16, 2019, 06:44
Default
  #9
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
This is what you should do if you want to update values of pR_ and pT_ for the next time step or iteration:


Code:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
    const scalar T
) const
{
    if (T < 773) //STEP 1
    {
    return ((1-pT_)*(0.0139*pow(T,0.5)) + (pT_*0.000496*T) + (pi_*0.0000000000342)*pow(T,3) + (px_*0.00000000228)*pow(T,3));
    }
    else if (T > 773) //STEP 2
    {
    scalar pii = (pR_*(1-pT_))/(1-pR_);
    scalar pxx = 1-((1-pT_)/(1-pR_));
    scalar pRR = (pii/(1-pxx));
    scalar pTT= pii + pxx;

    pR_ = pRR; //pRR should be Iterated back as variable pR_
    pT_ = pTT; //pTT should be Iterated back as variable pT_

    return ((1-pTT)*(0.0139*pow(T,0.5)) + (pTT*0.000496*T) + (pii*0.0000000000342)*pow(T,3) + (pxx*0.00000000228)*pow(T,3));
    }
}
Daniel_Khazaei is offline   Reply With Quote

Old   May 16, 2019, 06:55
Default
  #10
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Thank you for your comments.
Quote:
pR_ = pRR; //pRR should be Iterated back as variable pR_
pT_ = pTT; //pTT should be Iterated back as variable pT_
If compiled, including the above lines, I am facing the following error:
Quote:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:103:5: error: assignment of member ‘Foam::conductivitySolidTransport<Foam::constSolid Rad<Foam:olynomialSolidThermo<Foam::constRho> > >:R_’ in read-only object
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:104:5: error: assignment of member ‘Foam::conductivitySolidTransport<Foam::constSolid Rad<Foam:olynomialSolidThermo<Foam::constRho> > >:T_’ in read-only object

As pR_ and pT_ are read only object marked with underscore (_)
Kummi is offline   Reply With Quote

Old   May 16, 2019, 08:09
Default
  #11
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by Kummi View Post
Thank you for your comments.

If compiled, including the above lines, I am facing the following error:

As pR_ and pT_ are read only object marked with underscore (_)

I just noticed that the K function is using const attribute, so you can't modify any private data member inside that function. I will check it when I'm back home so I can actually try to compile it.
Kummi likes this.
Daniel_Khazaei is offline   Reply With Quote

Old   May 16, 2019, 09:02
Default
  #12
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Dear Mr. Daniel,
Thank you so much for your concern.
I'll also look into it for further modification.
Thank you ^^
Kummi is offline   Reply With Quote

Old   May 17, 2019, 02:00
Default
  #13
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Dear Mr. Daniel,
Why should the const attribute need to be removed!!
For example ~ in my case I defined Cp as a function of T and it works well however T is declared as const attribute.
Quote:
Cp = 1052.4*((exp(Tref1_/ T))/pow(((exp(Tref1_/ T)-1)/(Tref1_/T)),2)) ==> Varibles Tref1 and Tref2 are called as input
In above Cp case ==> T is declared as const attribute, that means this function cannot change the values of Cp with respect to T? But actually, I see that the Cp is updated at each time step with respect to T.
Am I understanding it right? Correct me if I am wrong because I am not proficient in C++.


Concerning, non-const attributes, I came across few posts related to it: ==> Access private data member
For read-only access to a private member accessed via a public function, - public const member need to be added to the header as,
Quote:
eg.
const foo& bar() const
{
return bar_;
}
And similarly, for write access, I need derived class, protected write-accessor.


Another post addressed about the non-const references [[objectRegistry: Added lookupObjectRef]] Problem with lookupObject functionality
Quote:
objectRegistry: Added lookupObjectRef to obtain non-const access to objects
So I try adding lookupObjectRef and even lookupRef to access non-constant attritubes
Quote:
pT_ = readScalar(subDict.lookupRef("pT"));
pR_ = readScalar(subDict.lookupRef("pR"));
However, it ends in error as
Quote:
/home/kumaresh/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransport.C:44:30: error: ‘const class Foam::dictionary’ has no member named ‘lookupRef’
/home/kumaresh/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransport.C:47:30: error: ‘const class Foam::dictionary’ has no member named ‘lookupRef’
I am trying to explore in all possible ways. If not const attribute, how should I need to be proceed with non-const approach. Kindly assist me
Kummi is offline   Reply With Quote

Old   May 17, 2019, 04:16
Default
  #14
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by Kummi View Post
Dear Mr. Daniel,
Why should the const attribute need to be removed!!
For example ~ in my case I defined Cp as a function of T and it works well however T is declared as const attribute.
In above Cp case ==> T is declared as const attribute, that means this function cannot change the values of Cp with respect to T? But actually, I see that the Cp is updated at each time step with respect to T.
Am I understanding it right? Correct me if I am wrong because I am not proficient in C++.
You are partly correct, however I'm talking about T being declared with const attribute. The method to define K is declared with const attribute (I have made it bold with red color). The input argument (T) is defined as const and it means that you can't modify the value of T inside your function.

Code:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
    const scalar T
) const
The bold and red const means that you can't modify private data members inside this function. In your case pT_, pi_, px_ and pR_ are private data members. if you change the method as follow by removing the const, you don't get a compiler error about writing to read-only object but probably another error will come up about overriding the method defined for K in the base class. This is because your class is derived from class thermo as declared in your class definition by stating public thermo:

This probably doesn't work either but you can try as I didn't check the base class of your derived calss:
Code:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
    const scalar T
)
The reason your example about Cp works is that:
  1. Cp is not a private data member.
  2. If Cp is actually a private data member, then you are modifying it inside a function that is not defined with const attribute.
One important thing, it seems that you are now familiar with C++. The following line means you are altering the value of Cp based on T. You are not altering the value of T, then defining T with or without const attribute doesn't matter.

Code:
Cp = function(T);
Quote:
Originally Posted by Kummi View Post
Concerning, non-const attributes, I came across few posts related to it: ==> Access private data member
For read-only access to a private member accessed via a public function, - public const member need to be added to the header as,
And similarly, for write access, I need derived class, protected write-accessor.
The method you have mentioned only allows you to read the value of bar_ after an object of type foo is created in your main program. Similarly if you define a non-const access method in your foo class as follow, then you can modify the value of bar_ in your program:

Code:
foo& bar()
{
    return bar_;
}
Quote:
Originally Posted by Kummi View Post
Another post addressed about the non-const references [[objectRegistry: Added lookupObjectRef]] Problem with lookupObject functionality
So I try adding lookupObjectRef and even lookupRef to access non-constant attritubes
However, it ends in error as
I am trying to explore in all possible ways. If not const attribute, how should I need to be proceed with non-const approach. Kindly assist me
This probably is due to the fact that you are using older OpenFOAM version and lookupRef is not yet implemented.
Daniel_Khazaei is offline   Reply With Quote

Old   May 17, 2019, 05:04
Default
  #15
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Can you try the attached file and let me know whether it works or not?
I don't have OpenFOAM-2.1.1 installed....
Attached Files
File Type: zip conductivity_test.zip (3.8 KB, 6 views)
Daniel_Khazaei is offline   Reply With Quote

Old   May 17, 2019, 06:45
Default
  #16
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Dear Daniel,
Thank you for your reply.
Quote:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
const scalar T // This scalar constant refers to T
) const // This scalar constant refers to K
In my case T is defined in 0 folder as 293K ==> when coal decomposition takes place T magnitude rises till 1323K, so T should be modified with respect to time inside the function below (as per logic), and so Cp will change as time progresses ....
Quote:
when Cp=f(T) => Cp varies with respect to T --> Correct me if I am wrong please

Cp = 1052.4*((exp(Tref1_/ T))/pow(((exp(Tref1_/ T)-1)/(Tref1_/T)),2)) ==> Varibles Tref1 and Tref2 are called as input
The red constant (for K) means that we can't modify private data members (pT_, pi_, px_ and pR_) inside this function [private data members (pT_, pi_, px_ and pR_) set with input values initiated manually].
I tried the following section below removing red const (for K) ==> leads to error

Quote:
template<class thermo>
inline Foam::scalar Foam::conductivitySolidTransport<thermo>::K
(
const scalar T
)
ERROR:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:70:21: error: prototype for ‘Foam::scalar Foam::conductivitySolidTransport<thermo>::K(Foam::scalar)’ does not match any in class ‘Foam::conductivitySolidTransport<thermo>’
In file included from solidMixtureThermo/solidMixtureThermo/solidMixtureThermos.C:32:0:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransport.H:116:23: error: candidate is: Foam::scalar Foam::conductivitySolidTransport<thermo>::K(Foam:: scalar) const
//************************************************** *********//

The reason your example about Cp works is that:
  1. Cp is not a private data member.
  2. If Cp is actually a private data member, then you are modifying it inside a function that is not defined with const attribute.
//************************************************** *********//
This is how my Cp is defined in member functions and as Cp=f(T) ::

Quote:
//- Heat capacity at constant pressure [J/(kg K)] //Member function (userdefinedThermo.H file)
inline scalar Cp(const scalar T) const; ==> this red const indicates const Cp right? Correct me if I am wrong please

(userdefinedThermoI.H file)
template<class rhoType>
inline Foam::scalar Foam:olynomialSolidThermo<rhoType>::Cp
(
const scalar T
) const
{ return (Cp = 1052.4*((exp(Tref1_/ T))/pow(((exp(Tref1_/ T)-1)/(Tref1_/T)),2)); } ==> Just wanna conform whether my Cp will vary here?
Good discussion ^^ Thank you
Kummi is offline   Reply With Quote

Old   May 17, 2019, 07:08
Default
  #17
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Dear Mr. Daniel,

I have tried working it ~ compiled successfully by changing one thing under conductivitySolidTransportI.H. Thank you loads !!
However, I have queries related to it.
conductivitySolidTransport.H
Quote:
// public data member are initialized:
scalar pRR;
scalar pTT;
conductivitySolidTransport.C
Quote:
// The variables are equated:
pRR = pR_;
pTT = pT_;
conductivitySolidTransportI.H

Quote:
//Under constructors ==> May i know why pRR and pTT are equated again with pR_ and pT_ (below) ?
{
pRR = pR_;
pTT = pT_;
}
Quote:
pRR = (pii/(1-pxx)); ==> ERROR: pRR’ in read-only object
pTT = pii + pxx;
==> ERROR: pTT’ in read-only object
However it works when scalar is added in prefix as ==> scalar pRR ~ scalar pTT
1) I would like to know the significance of this error --> because pRR and pTT was declared already, then why it is asking for declaration again??
2) So, after declaring scalar in prefix --> error is eliminated --> is that mean pTT' and pRR' becomes writable object (which seems to be very important I guess)
//*******************//

When T > 773K, if pRR = pR_ ==> for first run pRR is activated as input as variable pR_
*For second run, will pRR be iterated back in the equation automatically ?? ==> scalar pii = (pRR*(1-pTT))/(1-pRR);

//*******************//
However after compiling, I got some following errors:
Quote:
In file included from /home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransport.H:138:0,
from solidMixtureThermo/solidMixtureThermo/solidMixtureThermos.C:32:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H: In instantiation of ‘Foam::scalar Foam::conductivitySolidTransport<thermo>::K(Foam:: scalar) const [with thermo = Foam::constSolidRad<Foam:olynomialSolidThermo<Fo am::constRho> >; Foam::scalar = double]’:
lnInclude/multiComponentSolidMixture.C:200:9: required from ‘Foam::scalar Foam::multiComponentSolidMixture<ThermoSolidType>: :K(Foam::scalar, Foam::label) const [with ThermoSolidType = Foam::conductivitySolidTransport<Foam::constSolidR ad<Foam:olynomialSolidThermo<Foam::constRho> > >; Foam::scalar = double; Foam::label = int]’
solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C:49:9: required from ‘void Foam::solidMixtureThermo<MixtureType>::calculate() [with MixtureType = Foam::reactingSolidHeterogeneousMixture<Foam::cond uctivitySolidTransport<Foam::constSolidRad<Foam: olynomialSolidThermo<Foam::constRho> > > >]’
solidMixtureThermo/solidMixtureThermo/solidMixtureThermo.C:180:5: required from ‘Foam::solidMixtureThermo<MixtureType>::solidMixtu reThermo(const Foam::fvMesh&) [with MixtureType = Foam::reactingSolidHeterogeneousMixture<Foam::cond uctivitySolidTransport<Foam::constSolidRad<Foam: olynomialSolidThermo<Foam::constRho> > > >]’
lnInclude/basicSolidThermo.H:91:5: required from ‘static Foam::autoPtr<Foam::basicSolidThermo> Foam::basicSolidThermo::addmeshConstructorToTable< basicSolidThermoType>::New(const Foam::fvMesh&) [with basicSolidThermoType = Foam::solidMixtureThermo<Foam::reactingSolidHetero geneousMixture<Foam::conductivitySolidTransport<Fo am::constSolidRad<Foam:olynomialSolidThermo<Foam ::constRho> > > > >]’
lnInclude/basicSolidThermo.H:98:1: required from ‘Foam::basicSolidThermo::addmeshConstructorToTable <basicSolidThermoType>::addmeshConstructorToTable( const Foam::word&) [with basicSolidThermoType = Foam::solidMixtureThermo<Foam::reactingSolidHetero geneousMixture<Foam::conductivitySolidTransport<Fo am::constSolidRad<Foam:olynomialSolidThermo<Foam ::constRho> > > > >]’
solidMixtureThermo/solidMixtureThermo/solidMixtureThermos.C:141:1: required from here
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:86:9: warning: unused variable ‘pRR’ [-Wunused-variable] ==> is this error comes up since pRR is not used in K equation ??
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H: In member function ‘Foam::scalar Foam::conductivitySolidTransport<thermo>::K(Foam:: scalar) const [with thermo = Foam::constSolidRad<Foam:olynomialSolidThermo<Fo am::constRho> >; Foam::scalar = double]’:
/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/thermophysicalModels/solid/lnInclude/conductivitySolidTransportI.H:94:1: warning: control reaches end of non-void function [-Wreturn-type]
'/home/kummi2/OpenFOAM/OpenFOAM-2.1.1/cokeovenGasFOAM/lib/libCOKEGasbasicSolidThermo.so' is up to date.
Thank you for your timely help once again. Will the above errors affect my solution at any cost irrespective of library successful compilation?
Attached Files
File Type: gz conductivity.tar.gz (1.9 KB, 7 views)
Kummi 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
Thermal conductivity as function of temperature magazoni OpenFOAM Programming & Development 5 May 19, 2016 19:25
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37


All times are GMT -4. The time now is 02:40.