Skip to content

Instantly share code, notes, and snippets.

@mitchute
Created October 21, 2015 02:07
Show Gist options
  • Save mitchute/8847203eb6df1a99e36d to your computer and use it in GitHub Desktop.
Save mitchute/8847203eb6df1a99e36d to your computer and use it in GitHub Desktop.
#ifdef IMBALANCETEST
Real64 QNeighbor = 0.0;
for( DirectionCounter = NeighborBoundaryCells.l1(); DirectionCounter <= NeighborBoundaryCells.u1(); ++DirectionCounter ) {
CurDirection = NeighborBoundaryCells( DirectionCounter );
EvaluateFarfieldCharacteristics( DomainNum, cell, CurDirection, NeighborTemp, Resistance );
QNeighbor += ( NeighborTemp - RetVal ) / Resistance;
}
Real64 HeatStored = ( RetVal - cell.MyBase.Temperature_PrevTimeStep ) / Beta;
cell.MyBase.EnergyImbalance = HeatStored - QNeighbor;
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment