CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   heat source in solid (

MarkW November 24, 2011 11:02

heat source in solid
Hello there,
I'm trying to simulate the heat transfer in a piece of metal, which is heated by an electric current.
I already got a little bit familiar with laplacianFoam, is there some way to model a heat source inside of it?
Or do I have to use a different solver?
Thanks a lot!

nimasam November 25, 2011 02:34

heat source in laplacianFoam
you can model heat source! just by add a source term to the laplacianFoam equation
in creatFields.H

    volScalarField q

in laplacianFoam.C

fvm::ddt(T) - fvm::laplacian(DT, T) - q
then you should compile your solver with "wmake"! (look user guide)

then in your case study in folder zero you should add a file name "q"
you can apply different value from uniform or non-uniform heat source
for making the initial non uniform heat source use "setFields" or "funkySetFields"
for install "funkySetField", look at here:

MarkW November 25, 2011 09:19

Thanks a lot!
This approach saves me a lot of time! :)

All times are GMT -4. The time now is 15:02.