CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Help Required for chtMultiRegionSimpleFoam (https://www.cfd-online.com/Forums/openfoam/250135-help-required-chtmultiregionsimplefoam.html)

yips May 30, 2023 09:52

Help Required for chtMultiRegionSimpleFoam
 
1 Attachment(s)
Briefly, I am testing chtMultiRegionSimpleFoam for a simple case of conjugated heat flow but I could not get acceptable results. Below is a description of my test case and the problem I encountered:

• The case is a simple one of an aluminium body with a coolant channel.
• Top surface of the Al body has a heat input, I started with a heat flux and then I tried fixed gradient. Both resulted in the same issue.
• Coolant has a fixed velocity at input and fixed pressure at output.
• Simulation works fine but the results are not correct.

Below are the results and issues (see attached file for images):
o Pressure in the coolant developed OK and it looks correct.
o Flow velocity developed OK and looks correct.
o Heat flow within the Al body looks correct.
o The problem I have is the energy conservation does not work:
 Outlet coolant temperature is far too high for the energy input from the Al body.
 It feels as if in temperature calculation, coolant is treated as stationery.


So, to summaries:
Everything else looks correct in the simulation, except for temperature of the coolant. It behaves as if it is not flowing at all when temperature is calculated.

Any help and suggestions are welcome.

Below are my temperature boundary files for your reference:

(1) For the solid:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0/solid";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
solid_top
{
// type fixedValue;
// type externalWallHeatFluxTemperature;
// mode flux;
// q uniform 1e4; // heat flux [W/m^2]
// kappaMethod solidThermo;
// value uniform 320;

type fixedGradient;
gradient uniform 50;

}


solid_walls
{
type zeroGradient;
}

solid_to_liquid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
thicknessLayers (1e-5);
kappaLayers (0.024);

}
}

(2) for the liquid:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{

liquid_inlet
{
type fixedValue;
value uniform 300;
}
liquid_outlet
{
type inletOutlet;
inletValue uniform 300;
value uniform 300;
}
liquid_to_solid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
thicknessLayers (1e-5);
kappaLayers (0.024);
}

}

Alczem May 31, 2023 05:26

Hey!


I think there is a slight mistake in the definition of your boundary condition solid_to_liquid, where you set kappaMethod to fluidThermo. It should be solidThermo if I am not mistaken.


If you can share your whole case, it would be helpful to pinpoint other potential issue :)

yips May 31, 2023 05:51

Sharing the whole case
 
Hi Alczem,

Thanks for your reply. I will give it a try.

When you mentioned about sharing the whole case, what are the files needed to be included? (I am quite new to this forum, so I need to learn.)

Yiping

yips May 31, 2023 06:05

set kappaMethod to fluidThermo
 
Hi Alczem,

To clarify your suggestion:

for solid_to_liquid, I should set kappaMethod to solidThermo
for liquid_to_solid, I should keep kappaMethod to fluidThermo

Is above understanding correct?

Yiping

Alczem June 1, 2023 11:12

Quote:

To clarify your suggestion:

for solid_to_liquid, I should set kappaMethod to solidThermo
for liquid_to_solid, I should keep kappaMethod to fluidThermo

Is above understanding correct?

Yes!




To share your case, if it is not confidential, you can create a zip archive containing the 0, constant and system folders and the scripts you may be using to run the case. Don't include the mesh if it is too big.

yips June 5, 2023 08:49

Zip file attached
 
1 Attachment(s)
I have uploaded the case file. Sorry I have to remove all mesh data due to size limitation.

yips June 5, 2023 10:46

liquid temperature is still too high
 
1 Attachment(s)
Hi Alczem, I changed the T boundary file in the 0 directory for the solid/liquid interface to solidThermo:

solid_to_liquid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod solidThermo;
thicknessLayers (1e-5);
kappaLayers (0.024);

}

This does not look to have made a lot of difference. Only after 6000 iteration, liquid temperature has become too high and feels like it is not flowing. See attached. On the other hand, velocity results show that the liquid is flowing nicely.

Alczem June 6, 2023 04:57

Hey :)


I took a quick look at the case. A couple of things:

  • Relaxation factor for h for both the fluid and the solid is very low, try to get as close to 1 as possible (try 0.9, then 0.99 etc). It made a clear difference in several of my cases to achieve convergence.
  • for p file, you should have calculated as the type for every boundary.
  • you could try turbulentTemperatureRadCoupledMixed instead of turbulentTemperatureCoupledBaffleMixed for the coupled patches. I have used almost exclusively this one, the setups are similar.
  • Are you sure your flow is laminar? Turbulence can play a significant role for heat exchanges.
Other than that, I cannot see a blatant mistake, especially if the case runs ok despite the unconclusive results. Try to set a flowrate rather than a fixedValue for the velocity at the inlet, play with different numerical schemes, and double check your mesh.


Last thing you could do is to run a transient case rather than a steadystate case. It is usually more stable, and to speed up the computation, you can divide the heat capacity of your materials by 10 or 100 to reach a steady state quicker. Can't help you much more, sorry! Keep the thread updated if you manage to solve your issues :)

yips June 6, 2023 05:09

Thanks for your suggestions. I will try them and see if I can get something sensible. May take some time before I get somewhere but I will post it if anything works.

For relaxation factor, I took a value from some examples I found. I do not really know what does it do, so I made no attempt to change it. I will try your suggestion. What is it by the way?

yips June 6, 2023 09:41

Sorry for asking question about relaxation factor prematurely. I have found information from the OpenFoam web site now.

Thanks.


All times are GMT -4. The time now is 06:23.