CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Adding a heat source at baffle in chtMultiRegionFoam (https://www.cfd-online.com/Forums/openfoam-pre-processing/231229-adding-heat-source-baffle-chtmultiregionfoam.html)

DramaDrummer October 27, 2020 11:21

Adding a heat source at baffle in chtMultiRegionFoam
 
Hi to all FOAMers!

First of all thanks to everyone contributing to this forum. The posts helped me out for years and years!

This time my problem looks trivial, but I can't seem to solve it easily. To keep it simple, lets consider the case of a solid sphere within a tube and I only have to regions: The sphere (solid) and the fluid. Now I want to add a heat source to the interface between these two regions. Is there a simple way to do so? By now I often worked with fvOptions and scalarSemiImplicitSource to get a volumetric heat source within the sphere, but for my case a heat generation at the interface would be more realistic (heterogenous catalysis on the sphere surface).


Would be glad for any hints.
Cheers!
Kevin

DramaDrummer November 12, 2020 04:47

Searched a lot but still didn't get an answer to the question. I hoped that interRegionHeatTransferModel would work out, but as far as I see it is only for porous regions, were the structure is not simulated in detail, right? At least this fvOptions option is always used together with interRegionExplicitPorositySource.


I was thinking about a workaround like this: What I want is an heat source not directly at the baffle but within the cells in the fluid that have an interface with the solid (which are directly at the baffle). Is there a clever way to do so?

I was thinking about a cellZone that includes all of these cells and then use a volumetric heat source using scalarSemiImplicitSource. The problems are:
1. How do I get these cells in a cellZone?
2. Actually I need to implement the heat source not on the basis of the cell volume but on the basis of the area the cell shares with the solid. No way to do this without coding a ne sourceModel, right?


Thanks
Kevin

geth03 November 12, 2020 05:47

hi Kevin,

you can access the interface cells with topoSetDict, for that you need to define your solid-fluid boundary as patch, i do that with ansys mesher software, i don't know which software you use. as source write patchToFace and sourceInfo "nameOfThePatch".

afterwards you can access those cells within fvOptions.
you define the name of that area in topoSetDict.
then write your code for the heat source.

cheers

Bloerb November 14, 2020 11:43

You need a boundary condition to handle this. Yes, you could use a volumetric heat source and an fvOption but this will lead to mesh cell size dependence of your solution. You hence need to take the coupling boundary condition and add the external heat flux. Which should be pretty straightforward. The boundary condition on the interface states that Q_a=-Q_b. Heat flow exiting one domain enters the other. I have at some point in the past derived the boundary condition here in the forum which should make it easier to understand. You can easily program this in yourself. Just add a scalar to it on the right line. You might be able to hack this somehow without programming by turning on radiation in one domain and a set of boundary conditions but i haven't checked that.

DramaDrummer November 17, 2020 04:07

Quote:

Originally Posted by Bloerb (Post 787757)
You need a boundary condition to handle this. Yes, you could use a volumetric heat source and an fvOption but this will lead to mesh cell size dependence of your solution. You hence need to take the coupling boundary condition and add the external heat flux. Which should be pretty straightforward. The boundary condition on the interface states that Q_a=-Q_b. Heat flow exiting one domain enters the other. I have at some point in the past derived the boundary condition here in the forum which should make it easier to understand. You can easily program this in yourself. Just add a scalar to it on the right line. You might be able to hack this somehow without programming by turning on radiation in one domain and a set of boundary conditions but i haven't checked that.

Hi Bloerb,
thanks for the contribution! I also see the problem of volume dependent heat flux and I also thought that it should be quite straightforward to solve my problem by changing the BC to some extend. I searched thorugh the code and took a closer look at turbulentTemperatureCoupledBaffleMixedFvPatchScala rField.C, but unfortunately I'm not that good at C++ coding and didn't really see the part where I could add the heat source. Could you share the post where you derived the boundary condition or give a hint on where to look at exactly?
Best
Kevin


All times are GMT -4. The time now is 04:12.