CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

CHTC-based source term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2019, 05:21
Default CHTC-based source term
  #1
New Member
 
Join Date: Dec 2019
Posts: 1
Rep Power: 0
M.E. is on a distinguished road
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 :


\frac{\partial T}{\partial t}+u_{j}\frac{\partial T}{\partial x_{j}}=\frac{\partial}{\partial x_{i}}(\alpha_{eff}\frac{\partial T}{\partial x_{j}})+\frac{hS(T_{w}-T)}{\rho_{0}C_{p}V}


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
M.E. is offline   Reply With Quote

Reply

Tags
chtc, source term


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 16:25.