|
[Sponsors] |
April 27, 2024, 11:37 |
fvOptions / Volumetric heat source
|
#1 |
New Member
Christoph Trier
Join Date: Mar 2024
Posts: 6
Rep Power: 2 |
Hey guys,
I could use some help setting up my Volumetric heat source. I am trying to model a uniform volumetric thermal source in the fluid. For that, I am using fvOptions. I already wrote my option file and the solver also works; however, I get a warning "Source heatSource defined for field he but never used", and I can't find out why. I have tried different fvOptions. In both cases, I get the same error, and I can't find out why. I am using a solver named buoyantPimpleMhdFoam (combination to use MHD and Heat). Further down, I'll post the EEqn.H. Thanks, Christoph first one Code:
FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // options { heatSource { type scalarSemiImplicitSource; active true; selectionMode all; volumeMode specific; sources { he (19.4487 0); } } } Code:
HeatSource { type scalarSemiImplicitSource; active true; selectionMode all; scalarSemiImplicitSourceCoeffs { volumeMode absolute; //alt. specific selectionMode all; injectionRateSuSp { he (20 0); } } } Code:
{ volScalarField& he = thermo.he(); fvScalarMatrix EEqn ( fvm::ddt(rho, he) + fvm::div(phi, he) + fvc::ddt(rho, K) + fvc::div(phi, K) + ( he.name() == "e" ? fvc::div ( fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)" ) : -dpdt ) - fvm::laplacian(turbulence->alphaEff(), he) == rho*(U&g) + radiation->Sh(thermo, he) + fvOptions(rho, he) ); EEqn.relax(); fvOptions.constrain(EEqn); EEqn.solve(); fvOptions.correct(he); thermo.correct(); radiation->correct(); } PIMPLE: iteration 1 --> FOAM Warning : From virtual void Foam::fv:ption::checkApplied() const in file cfdTools/general/fvOptions/fvOption.C at line 137 Source heatSource defined for field he but never used |
|
April 28, 2024, 03:57 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26 |
Hello Christoph,
Here: Code:
he (19.4487 0); If you are using enthalpy it should be h, if you are using internal energy it should be e. In the code the variable is named he because it can be both, but the simulation actually solves for h or e depending on the case settings, and your source must be defined for the variable which is solved. I hope this will solve your problem. Yann |
|
Tags |
heatsource fvoptions |
|
|
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 18:13 |
Unsteady problem with volumetric heat source | Jonathan94 | STAR-CCM+ | 1 | July 21, 2018 02:26 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 01:22 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 01:41 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 10:57 |