RefrigerationGasCoolerAirCooled::RefrigerationGasCoolerAirCooled(const Model& model)
  : ParentObject(RefrigerationGasCoolerAirCooled::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::RefrigerationGasCoolerAirCooled_Impl>());

  CurveLinear heatRejectionCurve = CurveLinear(model);
  heatRejectionCurve.setName("Refrigeration Gas Cooler Air Cooled HR Curve");
  heatRejectionCurve.setCoefficient1Constant(0.0);
  heatRejectionCurve.setCoefficient2x(42000.0);
  heatRejectionCurve.setMinimumValueofx(3.0);
  heatRejectionCurve.setMaximumValueofx(22.2);

  bool ok = setRatedTotalHeatRejectionRateCurve(heatRejectionCurve);
  OS_ASSERT(ok);
  ok = setGasCoolerFanSpeedControlType("VariableSpeed");
  OS_ASSERT(ok);
  ok = setRatedFanPower(12000.0);
  OS_ASSERT(ok);
}
RefrigerationCondenserAirCooled::RefrigerationCondenserAirCooled(const Model& model)
  : ParentObject(RefrigerationCondenserAirCooled::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::RefrigerationCondenserAirCooled_Impl>());

  bool ok = true;

  CurveLinear heatRejectionCurve = CurveLinear(model);
  heatRejectionCurve.setName("Refrigeration Condenser Air Cooled HR Curve");
  heatRejectionCurve.setCoefficient1Constant(0.0);
  heatRejectionCurve.setCoefficient2x(22000.0);
  heatRejectionCurve.setMinimumValueofx(5.0);
  heatRejectionCurve.setMaximumValueofx(22.2);

  setRatedEffectiveTotalHeatRejectionRateCurve(heatRejectionCurve);
  OS_ASSERT(ok);

  setRatedSubcoolingTemperatureDifference(0.0);
  setCondenserFanSpeedControlType("VariableSpeed");
  setRatedFanPower(7000.0);
  setMinimumFanAirFlowRatio(0.25);
}
boost::optional<IdfObject> ForwardTranslator::translateCurveLinear( 
    CurveLinear& modelObject)
{
  IdfObject idfObject(IddObjectType::Curve_Linear);

  m_idfObjects.push_back(idfObject);

  OptionalString s;
  OptionalDouble d;

  if ((s = modelObject.name())) {
    idfObject.setName(*s);
  }

  idfObject.setDouble(Curve_LinearFields::Coefficient1Constant,modelObject.coefficient1Constant());
  idfObject.setDouble(Curve_LinearFields::Coefficient2x,modelObject.coefficient2x());
  idfObject.setDouble(Curve_LinearFields::MinimumValueofx,modelObject.minimumValueofx());
  idfObject.setDouble(Curve_LinearFields::MaximumValueofx,modelObject.maximumValueofx());
  if ((d = modelObject.minimumCurveOutput())) {
    idfObject.setDouble(Curve_LinearFields::MinimumCurveOutput,*d);
  }
  if ((d = modelObject.maximumCurveOutput())) {
    idfObject.setDouble(Curve_LinearFields::MaximumCurveOutput,*d);
  }
  if (!modelObject.isInputUnitTypeforXDefaulted()) {
    idfObject.setString(Curve_LinearFields::InputUnitTypeforX,modelObject.inputUnitTypeforX());
  }
  if (!modelObject.isOutputUnitTypeDefaulted()) {
    idfObject.setString(Curve_LinearFields::OutputUnitType,modelObject.outputUnitType());
  }

  return idfObject;
}