|
[Sponsors] |
December 2, 2019, 05:21 |
CHTC-based source term
|
#1 |
New Member
Join Date: Dec 2019
Posts: 1
Rep Power: 0 |
Hello,
I'm trying to implement a convective heat transfer coefficient based source term for the energy equation of an incompressible heat transfer solver. The equation I wish to implement would be the following : To do this, I modified the createFields.H of my solver to implement two volScalarFields, h and Tw. To avoid taking into account the thermal contribution of the wall twice, alphaEff would be set to zero at the wall, and h and Tw set to zero anywhere but at the wall. To implement this source term, I looked at fvOptions(T), however I could not find a way of implementing non-constant semi-implicit coefficients for the source term, thus I tried to implement it this way : Code:
fvScalarMatrix TEqn ( fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(alphaEff, T) == - fvm::Sp(h*Surface/(rho*Cp*Volume),T)+fvc::Sp(h*Surface /(rho*Cp*Volume),Tw) ); with rho and Cp two scalars and Volume = mesh.V() and Surface = mesh.magSf(). My main problem is that the Sp() function allows as arguments a scalar and a volScalarField or volVectorField, and I cannot find a way to fit the surface and volume part into any of these types. I tried to use a fvc::reconstructMag(mesh.magSf()) to transform the type of mesh.magSf() from a surfaceScalarField into a volScalarField, and also to create a volumeScalarField Volume in the createFields.H with Volume.ref() = mesh.V(), but to no avail. Does anyone have an idea to get past this problem ? Thanks in advance, Matthieu |
|
Tags |
chtc, source term |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
momentum source term | zwdi | FLUENT | 14 | June 27, 2017 16:40 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |