|
[Sponsors] |
Flow with source term and compressible::turbulentTemperatureCoupledBaffleMix ed bc |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 19, 2017, 09:08 |
Flow with source term and compressible::turbulentTemperatureCoupledBaffleMix ed bc
|
#1 |
New Member
Gerben Schooneveldt
Join Date: Jan 2017
Posts: 1
Rep Power: 0 |
I am trying to solve a fluid in a solid container. The fluid is heated by a volumetric source term (an electromagnetic field, assumed to be constant in time but not homogeneous in space), causing the fluid to flow. The fluid should lose part of its heat to the surrounding solid. The temperature differences are fairly small, so I use the Boussinesq approximation. However, it turns out energy is not conserved.
My initial attempt was to use the following temperature equation for the fluid region: Code:
fvScalarMatrix TEqn ( fvm::ddt(rho, T) + fvm::div(phi, T) - fvm::laplacian(alpha, T) == fvc::Sp(source) ); TEqn.solve(); Now, if I use the zeroGradient boundary condition between fluid and solid, so there is no heat exchange, I find that after 90 s, the thermal energy within the fluid region is 188 J, while integrating the provided power yields only 141 J. If I remove the term fvm::div(phi, T) from the equation, the energy balance is correct, but evidently the temperature distribution does not take fluid into account anymore. The energy balance is also correct, if I split the equation like this: Code:
fvScalarMatrix TEqn ( fvm::ddt(rho, T) + fvm::div(phi, T) - fvm::laplacian(alpha, T) ); TEqn.solve(); fvScalarMatrix TsEqn ( fvm::ddt(rho, T) == fvc::Sp(source) ); TsEqn.solve(); Moreover, when I then use the original boundary condition (compressible::turbulentTemperatureCoupledBaffleMi xed), there is heat flowing from the fluid region to the solid region, but the temperature in the fluid region is not affected. When I use the first TEqn (including the source term), the heat flow from the fluid to the solid region does affect the temperature in the fluid region, but there is still a nett energy production within the fluid. Now, part of the problem seem to be in the implementation of the boundary condition. When I disable the source term and start with a homogeneously heated fluid (delta T is 5 K, compared to the solid), then after 10 s the heat lost by the fluid region is -529 J, whereas the heat gained by the solid is only 283 J. The amount gained by the solid appears to be correct. When I comment out the debug message in the turbulentTemperatureCoupledBaffleMixed source file, the heat transfer rate written to the log file is correct (and consistent with the energy gain in the solid region). I am using OpenFOAM-2.2.x. If anyone could give me a pointer how to solve this, that would be much appreciated. Last edited by Gerben; January 19, 2017 at 19:45. |
|
Tags |
openfoam 2.2.x |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Term due to evaporation in energy transport equation | styleworker | OpenFOAM Programming & Development | 3 | September 7, 2022 04:09 |
momentum source term | zwdi | FLUENT | 14 | June 27, 2017 16:40 |
Mismatch of mass flow rates after source term implementation in SU2 | akshaydeshpande | SU2 | 1 | August 12, 2016 12:08 |
Two-phase flow, source term | Artvandelay | Main CFD Forum | 10 | January 12, 2014 08:40 |
Source term of multiphase flow in CFX44 | youngan | CFX | 0 | September 28, 2003 23:27 |