|
[Sponsors] |
November 2, 2023, 11:19 |
Heat Source Term
|
#1 |
New Member
Join Date: Nov 2023
Posts: 11
Rep Power: 3 |
I'm trying to add a time varying and spatially varying heat source to my simulation, but I am a bit unsure how to compute the energy residual. My source term is in W/m^3. Can I add this directly to the energy residual? I looked at other source term residuals and they all seem to multiply by the control volume and I don't quite understand why.
|
|
November 2, 2023, 13:16 |
|
#2 |
Senior Member
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 676
Rep Power: 21 |
The PDE is solved using a Finite Volume Method, where you integrate the PDE over a control volume. This is why the source term is multiplied by the volume, see e.g. equation (27) :
https://su2code.github.io/documents/AIAA-2018-3111.pdf |
|
November 2, 2023, 14:39 |
|
#3 |
New Member
Join Date: Nov 2023
Posts: 11
Rep Power: 3 |
Thanks for the reply. I've implemented the source term in the files:
CConfig.hpp CConfig.cpp CDriver.cpp flow_sources.hpp flow_sources.cpp CEulerSolver.cpp Are there any other files I need to make changes to? Also, for the energy equation, would the residual simply be: residual[nDim+1] = -Volume * Source |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[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 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 18:34 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 04:43 |