Energy not conserved - a sealed room heated up using buoyantPimpleFoam solver with boussinesq equation of state
The case is a sealed room with 80W output heat source. The problem I met is that the total enthalpy increase inside the whole room in 1s is 75J. A buoyantPimpleFoam solver with boussinesq equation of state is used for the case.
The setting of the heat source is to use scalarSemiImplicitSource, which used part of the room air as a cellSet heat source. The code is shown as follow
heat1 { type scalarSemiImplicitSource; enabled true; active true; scalarSemiImplicitSourceCoeffs { selectionMode cellSet; cellSet heat1; volumeMode absolute; injectionRateSuSp { h { Su table ( (0 80) ); Sp 0.0; } } } }
To measure the enthalpy increase inside the room, a swak4Foam code is used as follow, where 298.15 is the reference temperature T0, 1000 is the mass heat capacity Cp, and vol() is the volume for each cell.
T_volSum_room { name T_volSum_room; type swakExpression; valueType cellSet; libs ("libsimpleSwakFunctionObjects.so" ); outputControlMode timeStep; outputInterval 10; writeStartTime no; setName room; expression "(T-298.15)*1000*vol()*rho"; autoInterpolate true; accumulations (sum); verbose true; }
The case folder is in the attachment. To reproduce this issue just simple extract the zip file, entering the folder, execute ./Allrun.
Once the case finishes runing, open the postProcessing/swakExpression_T_volSum_room/0/T_volSum_roomOnce and will see time vs enthalpy, an enthalpy increase rate can be calculated based on that and it is 6-7% less than 80W heat source input.
Regards, Pu
Regard Pu