chtMultiRegionFoam: meaning of some expressions in the code
Hi everybody!
I have been working for quite a while with chtMultiRegionSimpleFoam, and I know how it works. However, right now I was taking a look at the code and, although I know what it does, due to my weak knowledge on C++ I don't understand a couple of things about it... Here goes a snipet of the solveSolid.H file: Code:
tmp<fvScalarMatrix> hEqn On the other hand, I would also like to understand how it is interpreted by the solver the following expression Code:
fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)") Many thanks in advance! Best regards, Alex |
Quote:
As far as I know, the second laplacian in quotation marks gives a name to this fvm::laplacian term, so that the following discretization scheme will be used for fvm::laplacian(betav*thermo.alpha(), h) and fvm::laplacian(betav*taniAlpha(), h). Code:
laplacianSchemes Regards, Yan |
Hi Yan,
Many thanks for your explanation, that clarifies a lot! Best regards, Alex |
betav is defined in the solver itself (check createSolidFields.H ) and is an additional IOobject. (a file like p U k omega etc)
Code:
// create input output object betavSolidIO You can therefore add a file betavSolid into your 0/yoursolidregion/ directory and it will be read. Should look like this Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
thermo.isotropic() It is therefore most likely a factor to account for porosity in your solid. (In the combustion solvers betav (beta_nu) is a volume porosity) You can set any value you want not just 0 and 1. You could maybe use it to disable heat conduction in parts of your solid. I would also be interested in the mathematics behind this factor. Let me know if you can find something. |
Hi Stephan,
First of all, I'm sorry for my late response, I was busy when you provided such an interesting information and I forgot to respond. Thanks for your detailed explanation about the meaning of betav. That really clarifies! I didn't know that a field called betavSolid could be defined in a solid region. However, I guess that when you define this field, its value will remains constant in time, right? If so, why is it written at each time step? It's quite useless, isn't it? Besides that, I agree with you on the possible meaning of betav, it makes sense that this is a factor that accounts for porosity in the solid. If someone else has any other idea about the meaning of betav, please, let us know! Quote:
Best regards, Alex |
Lost in the C++! Can you point me to the file were the values of field thermo.alpha gets assigned from stuff like Kappa, cp and T.
I'm thinking you could use betavSolid to allow for a solid with non-homogenous thermal properties I found out what I was looking for... and betavSolid is useful. |
2 Attachment(s)
I 've attached a pdf that shows in picture the effect of betavSolid simulating a local change in conductivity on the heater temperature distribution in the tutorial chtMultiRegionSimpleFoam multiRegionHeaterRadiation. The case to create it is also included.
|
That is a bit complicated. In the Make/options file you should find inclusions for the thermal libraries (of fluid and solid - for the fluid those are based on turbulence etc so a bit more complicated).
Code:
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ Code:
PtrList<solidThermo> thermos(solidRegions.size()); Here alpha is calculated for each cell and for the boundary. A small part of heSolidThermo.C and .H reads: Code:
alphaCells[celli] = Hence alpha=kappa/cp. All of the files you need to look at are basicThermo heSolidThermo solidThermo Hope that helps |
Thanks for that... its clarified a few things. The complexity of the thermo models is probably why the betavSolid field was introduced as a quicker way of making local adjustments. I had looked at making custom heSolidThermo but that would mean a custom solidThermo as well. That also means changing the chtMultiRegionSimpleFoam solver code that references that....
|
All times are GMT -4. The time now is 18:57. |