Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

I'm not sure I follow the question. To answer the question in the title, the infiltration gain or loss in W is simply the "Zone Infiltration Sensible Heat Loss Energy [J]" divide by the reporting frequency in seconds.

Are you trying to reproduce the calculations for Zone Infiltration Sensible/Latent Heat Loss/Gain?

If you want to trace a particular output variable, search the source code for the name of the output, and find the corresponding SetupOutputVariable call. (Usually there will be only one hit, but sometimes the output variable names show up in other report setups.)

                SetupOutputVariable(state,
                                "Zone Infiltration Sensible Heat Loss Energy",
                                OutputProcessor::Unit::J,
                                state.dataHeatBal->ZnAirRpt(state.dataHeatBal->Infiltration(Loop).ZonePtr).InfilHeatLoss,
                                OutputProcessor::SOVTimeStepType::System,
                                OutputProcessor::SOVStoreType::Summed,
                                state.dataHeatBal->Zone(state.dataHeatBal->Infiltration(Loop).ZonePtr).Name);

The 3rd argument is the variable associated with this output, ZnAirRpt.InfilHeatLoss. Searching on InfilHeatLoss leads to:

            Infiltration(j).InfilHeatLoss = Infiltration(j).MCpI_temp * (state.dataHeatBalFanSys->MAT(NZ) - Zone(NZ).OutDryBulbTemp) * TimeStepSys *
                                        DataGlobalConstants::SecInHour * ADSCorrectionFactor;

Searching on MCpI_temp leads to:

                MCpI_temp = IVF * AirDensity * CpAir *
                        (state.dataHeatBal->Infiltration(j).ConstantTermCoef +
                         std::abs(TempExt - state.dataZoneEquip->ZMAT(NZ)) * state.dataHeatBal->Infiltration(j).TemperatureTermCoef +
                         WindSpeedExt * (state.dataHeatBal->Infiltration(j).VelocityTermCoef +
                                         WindSpeedExt * state.dataHeatBal->Infiltration(j).VelocitySQTermCoef));

And a few lines above that:

        AirDensity = PsyRhoAirFnPbTdbW(state, state.dataEnvrn->OutBaroPress, TempExt, HumRatExt, RoutineNameInfiltration);
    CpAir = PsyCpAirFnW(HumRatExt);

The air properties are based on outdoor conditions.