|
[Sponsors] | |||||
Access species thermo functions from chtMultiRegionFoam bouandray condition |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 23 ![]() |
Hello,
I am trying to access the species thermo functions, especially HE and Cp/Cv, from within a boundary condition for chtMultiRegionFoam. The starting point is this boundary condition implemented in OpenFOAM-8: https://github.com/OpenFOAM/OpenFOAM...hScalarField.C Depending, on which side of the wall the solver is, there is either a fluid or a solid thermo model. For the fluid side, I was able to access the methods using this (pseudo) code: Code:
if (mesh.foundObject<rhoReactionThermo>(basicThermo::dictName))
{
const rhoReactionThermo& nbrThermo =
mesh.lookupObject<rhoReactionThermo>(basicThermo::dictName);
const basicSpecieMixture& composition = nbrThermo.composition();
const PtrList<volScalarField>& Y = composition.Y();
// Info<<"Y.size: " << Y.size() << endl;
forAll(TList, faceI) {
scalar he = 0;
scalar Cpv = 0;
if (Y.size() > 0) {
forAll(Y, componentI) {
scalar Yi = Y[componentI].boundaryField()[samplePatchi][faceI];
he += Yi*composition.HE(
componentI, nbrPPatch[faceI], TList[faceI]
);
Cpv += Yi*composition.Cp(
componentI, nbrPPatch[faceI], TList[faceI]
);
}
}
else
{
scalar Yi = 1;
he += Yi*composition.HE(
0, nbrPPatch[faceI], TList[faceI]
);
Cpv += Yi*composition.Cp(
0, nbrPPatch[faceI], TList[faceI]
);
}
}
On the solid side, I was not able to get hold on any "composition". I tried something like this: Code:
const solidThermo& nbrThermo =
nbrMesh.lookupObject<solidThermo>(basicThermo::dictName);
Is there a way to access this compositon/mixture methods of a solid? Thank you for any help Joachim |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 16 ![]() |
I've been working through similar issues recently, I think. I'm not sure about accessing composition/etc for solidThermo, but what I've done is use a solid reaction thermo... you could use it without reactions, and it should provide a means to use a multi-component (homogenous) mixture if desired. Then you can access using something like :
Code:
solidReactionThermo& solidThermo = solidThermos[i]; basicSpecieMixture& composition = solidThermo.composition(); PtrList<volScalarField>& Ys = composition.Y(); Caelan |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 23 ![]() |
Thank you for your answer. Unfortunately, I would like to do this in OpenFOAM-8. And solidReactionThermo was completely removed in this version.
|
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Species Transport Boundary Condition | Nishant_Sharma | FLUENT | 2 | June 1, 2018 03:16 |
| controlDict dynamic functions for chtMultiRegionFoam | Mhmnabil | OpenFOAM Running, Solving & CFD | 0 | October 25, 2017 15:22 |
| Define functions for Boundary Condition of Thermal Problems in Ansys | cyrusIII | ANSYS | 0 | October 16, 2016 18:50 |
| JANAF thermo, species with different Tcommon | adhiraj | OpenFOAM | 4 | March 10, 2014 10:51 |
| CFX fails to calculate a diffuser pipe flow | shenying0710 | CFX | 7 | March 26, 2013 05:13 |