CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Heat Injection (https://www.cfd-online.com/Forums/openfoam-programming-development/139842-heat-injection.html)

P Greene August 1, 2014 13:26

Heat Injection
 
Hi all,

I would like to model a subsonic turbulent flow of gas that will have a large amount of energy continuously injected into a particular volume using a laser. In particular, I want to observe the steady-state effects that this added heat has on the density (etc.) of the gas, so I can't just use a modified version of scalarTransportFoam.

I feel like there ought to be a fairly strait-forward way of modifying one of the solvers (my initial thought is rhoSimpleFoam) to add heat within a pre-defined region.

Any Ideas?

Thanks,
Pat

P Greene August 5, 2014 15:16

Progress
 
I've made significant progress in my attempts. I have tried adding a constant value (which I called E) to the right or left hand side of the EEqn, so that I had:

fvScalarMatrix EEqn
(
fvm::div(phi, he)
+ (
he.name() == "e"
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
fvOptions(rho,he)
+ E
);

or the same except with the E coming after the laplacian and before the == sign.

I create the E field from a file with the values defined at all the cell centers to be either 0 or some value. With E either above or below the equal sign, for E = 1e5 and less, there is no difference to the solution.

I have also tried commenting out EEqn.relax(), fvOptions.*(), thermo.correct(), and there has still been no change in the solution. What am I doing wrong?

-- Pat

Edit: The EEqn is from rhoSimpleFoam, and the energy file is correctly loaded with createFields. I've checked in paraview, and the data for E is correct.

chriss85 August 6, 2014 10:34

Are you sure that your energy values are correct? The unit of the internal energy e is J/m³. It's possible that your power density is higher than 1e5, but that's for you to decide.

P Greene January 17, 2015 16:10

Solved
 
You were right! Thanks. My values were just too low. I actually fixed this ages ago and forgot to reply.


All times are GMT -4. The time now is 00:13.