Esempio n. 1
0
void FlotationCell::BuildDataFields()
{
	static MDDValueLst DDB1[] ={
		{ FTST_ByCompound, "Compound" },
		{ FTST_ByElement, "Element" },
		{ 0 }};

	DD.CheckBox("On", "", &m_bOn, MF_PARAMETER);

	DD.Text("Requirements:");
	DD.Text("Primary Compound:");
	DD.Long("Method", "", idDX_SpecType, MF_PARAM_STOPPED | MF_SET_ON_CHANGE, DDB1);
	switch (eSpecType)
	{
	case FTST_ByCompound:
		DD.Long("Primary_Compound", "", idDX_PrimaryCompound, MF_PARAM_STOPPED | MF_NO_FILING | MF_SET_ON_CHANGE, gs_MVDefn.DDSolSpList());
		DD.String("PrimaryStr", "", idDX_PrimaryCompoundStr, MF_PARAM_STOPPED | MF_NO_VIEW); //This allows filing, and automatic setting of this parameter.
		break;
	case FTST_ByElement:
		DD.Long("Primary_Element", "", idDX_PrimaryElement1, MF_PARAM_STOPPED, &gs_vSolidElements.at(0));
		DD.Long("Secondary_Element", "", idDX_PrimaryElement2, MF_PARAM_STOPPED, &gs_vSolidElements.at(0));
	}
	DD.Double("Primary_Recovery", "", &dReqPrimaryRecovery, MF_PARAMETER, MC_Frac("%"));
	DD.Double("Primary_Grade", "", &dReqPrimaryGrade, MF_PARAMETER, MC_Frac("%"));
	DD.Text("Liquid Split:");
	DD.Double("Liquid_to_Concentrate", "", &dReqWaterFrac, MF_PARAMETER, MC_Frac("%"));
	DD.Text("Additional Compounds to Concentrate:");
	DD.Long("Number_of_Compounds", "", idDX_SecondaryCount, MF_PARAM_STOPPED | MF_SET_ON_CHANGE);
	if (vSecondaryIndices.size() > 0)
	{
		DD.ArrayBegin("Additional_Compounds", "Additional_Compounds", vSecondaryIndices.size());
		for (unsigned int i = 0; i < vSecondaryIndices.size(); i++)
		{
			DD.ArrayElementStart(i);
			DD.Long("Compound", "", idDX_SecondaryIndex + i, MF_PARAM_STOPPED | MF_NO_FILING, gs_MVDefn.DDSolSpList());
			DD.String("CompoundStr", "", idDX_SecondaryName + i, MF_PARAM_STOPPED | MF_NO_VIEW);
			DD.Double("Recovery", "", idDX_SecondaryReqRecovery + i, MF_PARAMETER, MC_Frac("%"));
			DD.ArrayElementEnd();
		}
		DD.ArrayEnd();
	}
	DD.Text("");
	DD.Text("Results:");
	DD.String("Primaries_Found", "", idDX_PrimariesFound, MF_RESULT | MF_NO_FILING);
	DD.Double("Actual_Recovery", "", &dPrimaryRecovery, MF_RESULT, MC_Frac);
	DD.Double("Actual_Grade", "", &dPrimaryGrade, MF_RESULT, MC_Frac);
	DD.Text("");
	DD.String("Gangue_Compounds", "", idDX_Unspecified, MF_RESULT | MF_NO_FILING);
	DD.Text("");
	DD.Double("Sf_Concentrate", "", &dSfConcentrate, MF_RESULT, MC_Frac);
	DD.Double("Sf_Tailings", "", &dSfTailings, MF_RESULT, MC_Frac);
	if (m_sPrestartErrors.GetLength() > 0)
	{
		DD.Text("");
		DD.Text("Prestart Errors:");
		DD.Text(m_sPrestartErrors);
	}
}
Esempio n. 2
0
void FilterPress::BuildDataFields()
{
	
	static MDDValueLst DDB0[]={
		{FM_SolidsToFiltrateFrac, "SolidsToFiltrateFraction"},
		{FM_FiltrateConc, "FiltrateConcentration"},
		{0}};

	static MDDValueLst DDB1[] = {
		{WM_ConstantEfficiency, "Constant Efficiency"},
		{WM_WashRatio, "Based on Wash Ratio"},
		{0}};
	DD.Text    ("");

	DD.Text		("Requirements");
	DD.Long		("Filtrate_Method", "Method", (long*)&eFiltrateMethod, MF_PARAMETER, DDB0 );
	DD.Show		(eFiltrateMethod == FM_SolidsToFiltrateFrac );
	if (false)//PrjFileVerNo()<48) //TODO: Fix this.
		DD.Double("", "RqdFiltSolids", &dReqSolidsToFiltrate, MF_PARAMETER, MC_Frac("%"));
	else
		DD.Double ("Rqd_Solids_To_Filtrate", "RqdSolToFilt", &dReqSolidsToFiltrate, MF_PARAMETER, MC_Frac("%"));
	DD.Show		(eFiltrateMethod == FM_FiltrateConc);
	DD.Double	("Rqd_FiltrateSolidsConc25","RqdFiltSolConc25", &dReqFiltSolConc, MF_PARAMETER, MC_Conc("g/L"));
	DD.Show		();
	//DD.Double	("Solids_ToFiltrateUsed", "SolToFiltUsed", &dSolidsToFiltUsed, MF_RESULT | MF_NO_VIEW, MC_Frac("%"));
	DD.Double	("Rqd_Cake_Moisture", "RqdCakeMoist", &dReqCakeMoisture, MF_PARAMETER, MC_Frac("%"));
	DD.Long		("Wash_Efficiency_Method", "WashEffMeth", (long*)&eWashMethod, MF_PARAMETER, DDB1);
	DD.Show		(eWashMethod == WM_ConstantEfficiency);
	DD.Double	("Rqd_Wash_Efficiency", "RqdWashEff", &dReqWashEfficiency, MF_PARAMETER, MC_Frac("%"));
	DD.Show		(eWashMethod == WM_WashRatio);
	DD.Double	("Rqd_Single_Pass_Wash_Efficiecny", "RqdSP_WashEff", &dReqWashEfficiency, MF_PARAMETER, MC_Frac("%"));
	DD.Show		();

	DD.Text		("Results");
	DD.Double	("Wash_Ratio", "WashRatio", &dWashRatio, MF_RESULT, MC_Frac("%"));
	DD.Double	("Wash_Efficiency", "WashEff", &dWashEfficiency, MF_RESULT, MC_Frac("%"));
	DD.Double	("Cake_Solids",	"CakeSolids", &dCakeSolids, MF_RESULT, MC_Frac("%"));
	DD.Double	("Filtrate_Solids", "FiltSolids", &dFiltSolids, MF_RESULT, MC_Frac("%"));
	DD.Double	("CakeSolidsConc@25", "CakeSolConc25", &dCakeSolConc, MF_RESULT, MC_Conc("g/L"));
	DD.Double	("FiltrateSolidsConc@25", "FiltSolConc25", &dFiltSolConc, MF_RESULT, MC_Conc("g/L"));
	DD.Long		("", "WashComp", (long*)&nWashCompSpecie, MF_PARAMETER, gs_MVDefn.DDLiqSpList());
	DD.Double	("", "CompWashEff", &dWashCompEff, MF_RESULT, MC_Frac("%"));

	DD.Text		("");
	DD.CheckBox	("TrackStatus", "", &bTrackStatus, MF_PARAMETER);

	DD.Show		(IsSolveBuffered);
	DD.Text		("");
	DD.CheckBox	("", "Filtrate2Washing", &bFilt2Washing, MF_PARAMETER);
	DD.CheckBox	("", "CakeDisch", &bCakeDischarge, MF_PARAMETER);
	DD.Text		("");
	DD.Double	("", "Press_Drop", &dPressureDrop, MF_RESULT, MC_DP("kPa"));
	DD.Double	("", "MembraneRes", &dMembraneRes, MF_PARAMETER, MC_); //TODO: Find out how to get the resistance in SMDK
	DD.Double	("", "Viscosity", &dViscosity, MF_PARAMETER, MC_Visc);
	DD.Double	("", "SpecCakeResistance", &dSpecCakeResistance, MF_PARAMETER, MC_);	//TODO: Find out how to get the resistance in SMDK
	DD.Double	("", "Area", &dArea, MF_PARAMETER, MC_Area("m^2"));

	//TODO: Find out about the rest of this stuff
}
Esempio n. 3
0
	void CSeperator_EfficiencyCurve::BuildDataFields(MDataDefn &DB)
	
	{ 
     DB.ObjectBegin("TS_EffCurve", "EffCurve");


	 DB.Text("Efficiency Curve");
	 //DB.StructBegin("TS_Top", "Top" );
	 DB.StructBegin("Top");
	 DB.Double("Alpha"			, "", &m_dTopAlpha	       , MF_PARAMETER ,  MC_None);
	 DB.Double("Beta"			, "", &m_dTopBeta	       , MF_PARAMETER ,  MC_None);
	 DB.Double("BetaStar"		, "", &m_dTopBetaStar	   , MF_RESULT ,  MC_None);
	 DB.Double("D50"			, "", &m_dTopD50	       , MF_PARAMETER ,  MC_L("mm"));
	 DB.Double("C"				, "", &m_dTopC			   , MF_PARAMETER ,  MC_None);
	 DB.Double("WaterSplitToUS"	, "", &m_dTopWaterSplitToUS, MF_PARAMETER ,  MC_Frac("%"));
	 DB.StructEnd();

	 //DB.StructBegin("TS_Bottom", "Bottom" );
 	 DB.StructBegin("Bottom" );
	 DB.Double("Alpha"			, "", &m_dBottomAlpha	       , MF_PARAMETER ,  MC_None);
	 DB.Double("Beta"			, "", &m_dBottomBeta	       , MF_PARAMETER ,  MC_None);
	 DB.Double("BetaStar"		, "", &m_dBottomBetaStar	   , MF_RESULT ,     MC_None);
	 DB.Double("D50"			    , "", &m_dBottomD50		   , MF_PARAMETER ,  MC_L("mm"));
	 DB.Double("C"				, "", &m_dBottomC			   , MF_PARAMETER ,  MC_None);
	 DB.Double("WaterSplitToUS"	, "", &m_dBottomWaterSplitToUS , MF_PARAMETER ,  MC_Frac("%"));
	 DB.StructEnd();

	//
	// Outputs
	//
	DB.Page("Top Deck Partition");
    CString Tg;
    for (int i=(m_TopEu.GetSize()-1); i>=0; i--)
    {
      Tg.Format("Top.I%02d", i);
      DB.Double((char*)(const char*)Tg, "", &m_TopEu[i], MF_RESULT, MC_Frac("%"));
    }
    DB.Page("Bottom Deck Partition");
    for (int i=(m_BottomEu.GetSize()-1); i>=0; i--)
    {
      Tg.Format("Bottom.I%02d", i);
      DB.Double((char*)(const char*)Tg, "", &m_BottomEu[i], MF_RESULT, MC_Frac("%"));
    }
	DB.ObjectEnd();

	}
Esempio n. 4
0
void Splitter::BuildDataFields()
  {
/*CMRegex *regex = new CMRegex();
char buf[1024];
strcpy_s(buf, "a string for regexing.");
CString regexStr = "regex";
CString replaceStr = "replac";
CString out = regex->Replace(buf, regexStr, replaceStr);*/

  DD.Text("Requirements...");
  DD.CheckBox("SplitByPhase", "",  &bDoPhaseSplit, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.Double("Split", "",       &dRqdFracSplit, MF_PARAMETER|(bDoPhaseSplit ? MF_NO_VIEW : 0), MC_Frac("%"));
  DD.Double("SolidSplit", "",  &dRqdSolSplit,  MF_PARAMETER|(bDoPhaseSplit ? 0 : MF_NO_VIEW), MC_Frac("%"));
  DD.Double("LiquidSplit", "", &dRqdLiqSplit,  MF_PARAMETER|(bDoPhaseSplit ? 0 : MF_NO_VIEW), MC_Frac("%"));
  DD.Double("VapourSplit", "", &dRqdVapSplit,  MF_PARAMETER|(bDoPhaseSplit ? 0 : MF_NO_VIEW), MC_Frac("%"));
  DD.Text("");
  DD.Text("Results...");
  DD.Double("FeedQm", "",  &dFeedQm,     MF_RESULT|MF_NO_FILING, MC_Qm);
  DD.Double("ProdQm0", "", &dProdQm0,    MF_RESULT|MF_NO_FILING, MC_Qm);
  DD.Double("ProdQm1", "", &dProdQm1,    MF_RESULT|MF_NO_FILING, MC_Qm);

  /* The 4 lines for "Split" to "VapourSplit" could be coded as follows:
  unsigned long FieldFlags;
  if (bDoPhaseSplit)
  FieldFlags = MF_PARAMETER|MF_NO_VIEW;
  else
  FieldFlags = MF_PARAMETER;
  DD.Double("Split", "",   &dRqdFracSplit, MC_Frac, FieldFlags);
  if (bDoPhaseSplit)
  FieldFlags = MF_PARAMETER;
  else
  FieldFlags = MF_PARAMETER|MF_NO_VIEW;
  DD.Double("SolidSplit", "",  &dRqdSolSplit, MC_Frac, FieldFlags);
  DD.Double("LiquidSplit", "", &dRqdLiqSplit, MC_Frac, FieldFlags);
  DD.Double("VapourSplit", "", &dRqdVapSplit, MC_Frac, FieldFlags);
  */
  }
Esempio n. 5
0
void CPrecipitator::BuildDataFields()
{
  static MDDValueLst DDB1[]={
    {GRM_AAEq,   "A - Aeq" },
    {GRM_sigma,   "sigma"},
    {0}};

  static MDDValueLst DDB2[]={
    {0,   "Mass" },
    {1,   "Fraction"},
    {2,   "Number"},
    {0}};

  static MDDValueLst DDB3[]={
    {THL_None,          "None" },
    {THL_TempDrop,      "TempDrop"},
    {THL_FixedHeatFlow, "FixedLoss"},
    {THL_Ambient,  "Ambient"},
    {THL_FixedTemp, "FixedTemp"},
    {0}};

  static MDDValueLst DDB5[]={
    { COOL_dQ, "Fixed.dQ"},
    { COOL_dT, "Fixed.dT" },
    { COOL_Hx, "HeatExchange"},
    {0}};

  static MDDValueLst DDB6[]={
    { EVAP_NONE, "None"},
    { EVAP_FIXED, "Fixed"},
    { EVAP_dT, "Ambient" },
    {0}};

  static MDDValueLst DDB7[]={
    { COOL_NONE, "None"},
    { COOL_INTERNAL, "Internal"},
    { COOL_EXTERNAL, "External" },
    {0}};

  static MDDValueLst DDB8[] = {
    {0,   "Quasi Timestep" },
    {1,   "Direct"},
    {0}};

  static MDDValueLst DDB13[]={
    {0,   "A/C - A/Ceq" },
    {1,   "Growth Rate"},
    {0}};


  static MDDValueLst DDB14[]={
    {0,   "Growth" },
    {1,   "Aggl (N/s/m^3)"},
    {2,   "deltaN"},
    {3,   "oldN"},
    {4,   "newN"},
    {0}};
 
  static MDDValueLst DDB15[]={
    {CM_Molerus,   "Molerus" },
    {CM_Lynch,   "Lynch"},
    {CM_Plitt, "Plitt"},
    {0}};



  DD.Text  ("");

#ifdef TTDEBUG
  DD.CheckBox("TTDBG", "",  &bTTDebug, MF_PARAMETER);
#endif
  DD.CheckBox("On", "",  &bOnLine, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.CheckBox("Use.Saved.Tank", "",  &bTest, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.CheckBox("Verbose", "",  &bVerbose, MF_PARAMETER|MF_SET_ON_CHANGE|MF_INIT_HIDDEN);

  DD.Text("");
  DD.CheckBox("Growth.On", "",  &bGrowthOn, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.CheckBox("Agglom.On", "",  &bAgglomOn, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.CheckBox("Nucleation.On", "",  &bNuclOn, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.CheckBox("Classif.On", "",  &bClassOn, MF_PARAMETER|MF_SET_ON_CHANGE);

  DD.Text("");
  DD.Text  ("Requirements");
  DD.Double("TankVol", "",	        &dTankVol         ,MF_PARAMETER, MC_Vol("m^3"));
  DD.Double("UFValve", "",	        &m_dUFrac         ,MF_PARAMETER, MC_Frac("%"));
  DD.Double("ShortCircuit", "",	        &m_dShort_Circ         ,MF_PARAMETER, MC_Frac("%"));

  DD.Long  ("ThermalLossMethod", "",&iThermalLossMethod, MF_PARAMETER|MF_SET_ON_CHANGE, DDB3);
  DD.Show(iThermalLossMethod==THL_TempDrop);
  DD.Double("Temp_Drop", "",        &dTempDropRqd     ,MF_PARAMETER, MC_dT("C"));
  DD.Show(iThermalLossMethod==THL_FixedTemp);
  DD.Double("FixedTemp", "",        &dFixedTempRqd     ,MF_PARAMETER, MC_T("C"));
  DD.Show(iThermalLossMethod==THL_FixedHeatFlow);
  DD.Double("ThermalLossRqd", "",   &dThermalLossRqd  ,MF_PARAMETER, MC_Pwr("kW"));
  DD.Show(iThermalLossMethod==THL_Ambient);
  DD.Double("ThermalLossAmbient", "",  &dThermalLossAmbient ,MF_PARAMETER, MC_UA);
  DD.Show();
  DD.Long  ("Evaporation", "", &iEvapMethod , MF_PARAMETER|MF_SET_ON_CHANGE, DDB6);

  DD.Show(iEvapMethod!=EVAP_NONE);
  DD.Double("Evap.Rate", "",  &m_dEvapRate ,iEvapMethod==EVAP_FIXED?MF_PARAMETER:MF_RESULT, MC_Qm("kg/s"));
  DD.Show(iEvapMethod==EVAP_dT);
  DD.Double("Evap.Per.degK", "",            &m_dEvapRateK         ,MF_PARAMETER, MC_Qm("kg/s"));

  DD.Show();
  DD.Long  ("Cooling", "", &iCoolType, MF_PARAMETER|MF_SET_ON_CHANGE, DDB7);
  


  DD.Text("");

  DD.Text  ("");
  DD.Text  ("Results Tank");
  DD.Double("ResidenceTime", "",    &dResidenceTime ,MF_RESULT, MC_Time("h"));
  DD.Double("SuperSat", "", &m_dSSat, MF_RESULT, MC_);
  DD.Double("BrahmaSuperSat", "", &m_dBSSat, MF_RESULT, MC_);
  
  DD.Double("SSA",  "", &dSSA, MF_RESULT, MC_SurfAreaM);
  DD.Double("Yield", "",            &dYield         ,MF_RESULT, MC_Conc("kg/m^3"));
  DD.Double("THA.Precip", "",        &dTHAPrecip     ,MF_RESULT, MC_Qm("kg/s"));
  DD.Double("AluminaPrecip", "",    &dAlPrecip     ,MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Solids.Precip", "",    &dSolPrecip     ,MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Solids.Conc", "",    &dSolConc     ,MF_RESULT,  MC_Conc("kg/m^3"));

    
  DD.Text  ("Results");         
  DD.Show();                    
  DD.Double("Vol_FlowIn", "",       &dQvin          ,MF_RESULT, MC_Qv("L/s"));
  DD.Double("Vol_FlowOut", "",      &dQvout         ,MF_RESULT, MC_Qv("L/s"));

  DD.Double("MassFlowIn", "",       &dQmin          ,MF_RESULT, MC_Qm("t/d"));
  DD.Double("MassFlowOut", "",      &dQmout         ,MF_RESULT, MC_Qm("t/d"));
  
  DD.Double("ACin", "",             &dACin          ,MF_RESULT, MC_);
  DD.Double("ACout", "",            &dACout         ,MF_RESULT, MC_);
  DD.Double("ACequil", "",          &m_dACeq        ,MF_RESULT, MC_);


  DD.Double("TempIn", "",           &dTin           ,MF_RESULT, MC_T("C"));
  DD.Double("TempOut", "",          &dTout          ,MF_RESULT, MC_T("C"));
  DD.Double("GrowthRate", "",       &m_dGrowth          ,MF_RESULT, MC_Ldt("um/h"));
  DD.Double("NuclRate", "",         &m_dNucleation          ,MF_RESULT, MC_);
  DD.Double("NuclNum", "",          &m_dNuclN          ,MF_RESULT, MC_);
  DD.Double("AgglNum", "",          &m_dAgglomN          ,MF_RESULT, MC_);
  DD.Double("AgglMin", "",          &agmin,   MF_RESULT, MC_);
  DD.Double("BoundSoda",  "",       &dSoda,             MF_RESULT, MC_);
 

  DD.Text("");
  
  DD.Page("Precip");

  DD.Double("ConvergenceLimit", "",   &m_dConvergenceLimit, MF_PARAMETER|MF_INIT_HIDDEN, MC_);
  DD.Double("Acceleration", "",   &m_dAcc, MF_PARAMETER|MF_INIT_HIDDEN, MC_);
  DD.Double("AggMinLimit", "",   &dAggMinLim, MF_PARAMETER|MF_INIT_HIDDEN, MC_);

  DD.Double("ThermalDamping", "",   &m_dDamping, MF_PARAMETER|MF_INIT_HIDDEN, MC_Frac("%"));
  DD.Double("MassDamping", "",   &m_dMassDamping, MF_PARAMETER|MF_INIT_HIDDEN, MC_Frac("%"));

  DD.Long("Iterations", "", &m_lIterations, MF_RESULT|MF_NO_FILING);
  DD.Long("IterMax", "", &m_lItermax, MF_PARAMETER);
  


  DD.Text("");
  DD.Text("Plant Parameters");
  DD.Long("MaxAgglClass", "",   &m_lMaxAgglomClass, MF_PARAMETER);
  DD.Double("NuclPlantCorr", "", &m_dNuclPlantCorr, MF_PARAMETER, MC_);
  DD.Double("AgglomerisationConst", "", &m_dKAgglom, MF_PARAMETER, MC_);
  DD.Double("SurfaceActivity", "", &m_dSurfaceAct, MF_PARAMETER, MC_);
  DD.Double("SodaConst", "", &m_dSodaConst, MF_PARAMETER, MC_);
 
  

  DD.Text("");
  DD.Text("Linear Growth Rate Equation");
  DD.Double("GrowthConst", "",     &m_dK_G   	   ,MF_PARAMETER, MC_);
  DD.Double("GrowthActEnergy", "", &m_dActEGrowth  ,MF_PARAMETER, MC_T("K"));
  DD.Double("GrowthPwr", "",     &m_dgamma_g     ,MF_PARAMETER, MC_);
  DD.Long  ("GrowthTerm", "", &m_lGrowthTerm, MF_PARAMETER|MF_SET_ON_CHANGE, DDB1); 
  DD.Double("Sigma.Term", "",          &m_dsigma          ,MF_RESULT|MF_NO_FILING, MC_);
 

  DD.Text("");
  DD.Text("Nucleation Rate Equation");
  DD.Long  ("NucleationTerm", "", &m_lNuclTerm, MF_PARAMETER|MF_SET_ON_CHANGE, DDB1); 
  DD.Double("NucleationActEnergy", "", &m_dActENucleation       ,MF_PARAMETER, MC_T("K"));
  DD.Double("NucleationConst", "",    	       &m_dK_N	    ,MF_PARAMETER, MC_);
  DD.Double("NucleationPwr", "",    	       &m_dgamma_N 	    ,MF_PARAMETER, MC_);

  DD.Text("");
  DD.Text("Agglomeration Rate Equation");
  DD.Double("SolidDenPwr", "",    	       &m_dn_s  	    ,MF_PARAMETER, MC_);
  DD.Double("GrowthPwrAggl", "",    	       &m_dgamma_2	    ,MF_PARAMETER, MC_);

  DD.Text("");
  DD.Text("Soda Incorporation");
  DD.Long  ("SodaTerm", "", &m_lSodaTerm, MF_PARAMETER|MF_SET_ON_CHANGE, DDB13);
  DD.Double("SodaPwr", "", &m_dgamma_s, MF_PARAMETER, MC_);
  DD.Double("SodaActEnergy",     "", &m_dActESoda    ,MF_PARAMETER, MC_T("K"));


  DD.Page("PSD");
  DD.Double("Feed.N.Tot", "", &dFeedNTot, MF_RESULT, MC_);
  DD.Double("Prod.N.Tot", "", &dProdNTot, MF_RESULT, MC_);
    

  // Classification Stuff
  DD.Show(bClassOn);

  DD.Page("Classification");

  DD.Long  ("ClassMethod", "", &iClassMethod , MF_PARAMETER|MF_SET_ON_CHANGE, DDB15);
  DD.Double("ExcessBypassUFlow", "",   &m_dBypass         ,MF_PARAMETER, MC_Frac("%"));
  DD.Double("MeasureSharpness",  "",   &m_dSharp_Index     ,MF_PARAMETER, MC_);
  DD.Double("CutSize",           "",   &m_dCut_Size        ,MF_PARAMETER, MC_);
  DD.Double("LiquorToUFlow",  "",      &m_dSlurry_split    ,MF_PARAMETER, MC_Frac("%"));
  DD.Double("OverPassOFlow",  "",      &m_dOverpass       ,MF_PARAMETER, MC_Frac("%"));
  DD.Double("L_0",  "",                &m_dL0              ,MF_PARAMETER, MC_);
  DD.Text("Results");
  DD.Double("SolidsSplit",  "",  &m_dxS        ,MF_RESULT, MC_Frac("%"));
  DD.Double("Efficiency",  "",   &m_dEff        ,MF_RESULT, MC_);
	  
   

  DD.Show(iCoolType!=0);
  DD.Page("Cooler");
  DD.Show(iCoolType==COOL_INTERNAL);
  DD.CheckBox("Cooler.On", "",  &m_bCoolerOn, MF_PARAMETER);
  DD.Long  ("Cooling.Type", "", (long*)&iCoolMethod, MF_PARAMETER|MF_SET_ON_CHANGE, DDB5);

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_dT));
  DD.Double("dT", "", &m_dCooldT, MF_PARAMETER, MC_dT("C")); 

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_dQ));
  DD.Double("dQ",  "", &m_dCooldQ, MF_PARAMETER, MC_Pwr("kW")); 

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_Hx));
  DD.Double("HX.Area",  "", &m_dCoolArea, MF_PARAMETER, MC_Area("m^2")); 
  DD.Double("HX.HTC",  "", &m_dCoolHTC, MF_PARAMETER, MC_HTC);
  DD.Show(iCoolType==COOL_EXTERNAL || (iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_Hx)));
  DD.CheckBox("By.Vol.Flow", "",  &m_bByVolFlow, MF_PARAMETER|MF_SET_ON_CHANGE);

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_Hx));
  DD.Double("Cooling.Flow",  "", &m_dCoolFlow,
	    m_bByVolFlow ? MF_RESULT : MF_PARAMETER, MC_Qm("kg/s")); // Internal cooling flow
  DD.Double("Int.Vol.Flow", "", &m_dIntCoolVolFlow, 
	    m_bByVolFlow ? MF_PARAMETER : MF_RESULT, MC_Qv("m^3/s")); // By Volume

  DD.Double("Hx.UA", "", &m_dUA, MF_RESULT, MC_UA);
  DD.Double("Hx.LMTD", "", &m_dLMTD, MF_RESULT, MC_dT);

  DD.Double("Water.Flow",  "", &m_dCoolWaterFlow, MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Water.Vol.Flow",  "", &m_dCoolWaterFlowVol, MF_RESULT, MC_Qv);

  DD.Double("Water.Tin",  "", &m_dCoolWaterTin, MF_RESULT, MC_T("C"));
  DD.Double("Water.Tout",  "", &m_dCoolWaterTout, MF_RESULT, MC_T("C"));
  DD.Double("Liquor.Tin",  "", &m_dLiquorTin, MF_RESULT, MC_T("C"));
  DD.Double("Liquor.Tout",  "", &m_dLiquorTout, MF_RESULT, MC_T("C"));
  DD.Show(iCoolType==COOL_EXTERNAL);
  DD.Double("Ext.Vol.Flow", "", &m_dExtCoolVolFlow, 
	    m_bByVolFlow ? MF_PARAMETER : MF_RESULT, MC_Qv("m^3/s")); // Ext Cooling.Flow
  DD.Double("Ext.Cooling.Flow", "", &m_dExtCoolFlow, 
	    m_bByVolFlow ? MF_RESULT : MF_PARAMETER, MC_Qm("kg/s")); // Ext Cooling.Flow

  DD.Double("Ext.Cooling.Temp", "", &m_dExtCoolTemp, MF_RESULT, MC_T("C")); // Ext Cooling.Temp
  DD.Double("Ext.Cooling.totHz", "", &m_dCoolOutTotHz , MF_RESULT, MC_Pwr("kW")); // Ext Cooling Rate
  DD.Show(iCoolType!=0);
  DD.Double("Cooling.Rate", "", &m_dCoolRate, MF_RESULT, MC_Pwr("kW")); // Ext Cooling Rate


  DD.Show();
  DD.Page("Inlet");

  DD.Long("PSD.Display", "", &iPSD, MF_PARAMETER|MF_SET_ON_CHANGE, DDB2);
  const int NumSpecies = gs_MVDefn.Count();
  for (int i=0; i<=nClasses; i++) { 
    std::stringstream os;
    os << "Size " << std::setw(3) << i << std::setw(12) << L[i] << " " << Lav[i] ;
    DD.Double(os.str().c_str(), "", dd[2]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }
  

  /*******************  
  DD.Page("Size In");
  for (int i=0; i<=nClasses; i++) { 
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[3]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }************************/

  DD.Page("Size In");
  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[4]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }
  DD.Text("");
  DD.Double("Number", "", dd[4]+26, MF_RESULT|MF_NO_FILING, MC_None);
  DD.Double("Area", "", dd[4]+27, MF_RESULT|MF_NO_FILING, MC_None);
  DD.Double("Vol", "", dd[4]+28, MF_RESULT|MF_NO_FILING, MC_None);
  DD.Double("Mass", "", dd[4]+29, MF_RESULT|MF_NO_FILING, MC_None);

  DD.Page("Size Tank");
  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[5]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }
  DD.Text("");
  DD.Double("Number", "", dd[5]+26, MF_RESULT|MF_NO_FILING, MC_None);
  DD.Double("Area", "", dd[5]+27, MF_RESULT|MF_NO_FILING, MC_None);
  DD.Double("Vol", "", dd[5]+28, MF_RESULT|MF_NO_FILING, MC_None);
  DD.Double("Mass", "", dd[5]+29, MF_RESULT|MF_NO_FILING, MC_None);
  
  DD.Page("Numbers...");
  //  DD.Page(DDB14[iDType].m_pStr);
  DD.Long("DType", "", &iDType, MF_PARAMETER|MF_SET_ON_CHANGE, DDB14);  

  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[6]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }
  DD.Object(SavedTank, MDD_RqdPage);

    
#ifdef TTDEBUG
  DD.Page("Growth...");

  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[7]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }
  DD.Page("Aggl...");

  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[8]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }
  DD.Page("Nin...");

  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[9]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }

  DD.Page("Nout...");

  for (int i=0; i<=nClasses; i++) {
    std::stringstream os;
    os << "Size " << std::setw(3) << i;
    DD.Double(os.str().c_str(), "", dd[10]+i, MF_RESULT|MF_NO_FILING, MC_None);
  }

#endif



}
Esempio n. 6
0
void CLimnStream::BuildDataFields()
  { 
  //DD.Double();
  DD.Page("Limn", false);
  DD.Text("");
  if (Usage==SPMU_Flow)
    {
    DD.Text("Calculated Values ...");

    DD.Double("OreSolidsFlow",                   "", idx_OreSolidsFlow      , MF_RESULT, MC_Qm("t/h")); 
    DD.Double(gs_DWCfg.PassSizePercentsText(0),  "", idx_PassingSize0       , MF_RESULT, MC_L("mm")); 
    DD.Double(gs_DWCfg.PassSizePercentsText(1),  "", idx_PassingSize1       , MF_RESULT, MC_L("mm")); 
    DD.Double(gs_DWCfg.PassSizePercentsText(2),  "", idx_PassingSize2       , MF_RESULT, MC_L("mm")); 
    DD.Double("MeanSG",                          "", idx_MeanSG             , MF_RESULT, MC_Rho("t/m^3")); 
    DD.Double("MeanSize",                        "", idx_MeanSize           , MF_RESULT, MC_L("mm")); 
    DD.Double("WaterFlow",                       "", idx_WaterFlow          , MF_RESULT, MC_Qm("t/h")); 
    DD.Double("SolidsFrac",                      "", idx_SolidsFrac         , MF_RESULT, MC_Frac("%")); 
    DD.Double("PulpSG",                          "", idx_PulpSG             , MF_RESULT, MC_Rho("t/m^3")); 
    DD.Double("FeSiFlow",                        "", idx_FeSiFlow           , MF_RESULT, MC_Qm("t/h")); 
    DD.Double("DiamondFlow",                     "", idx_DiamondFlow        , MF_RESULT, MC_Qm("Carat/h")); 
    DD.Double("DiamondAssay",                    "", idx_DiamondAssay       , MF_RESULT, MC_Assay("Carat/100t")); 
    DD.Double("LiberatedFlow",                   "", idx_LiberatedFlow      , MF_RESULT, MC_Qm("Carat/h")); 
    DD.Double("RelativeDiamonds",                "", idx_RelativeDiamonds   , MF_RESULT, MC_Frac("%")); 
    DD.Double("LiberatedFraction",               "", idx_LiberatedFraction  , MF_RESULT, MC_Frac("%")); 
    DD.Double("RelativeRevenue",                 "", idx_RelativeRevenue    , MF_RESULT, MC_Frac("%")); 
    DD.Double("Revenue",                         "", idx_Revenue            , MF_RESULT, MC_MoneyFlow("R/h")); 
    DD.CheckBox("MarkAsBase",                    "", idx_BaseMark           , MF_PARAMETER); 
    DD.String("BaseTag",                         "", idx_BaseTag            , MF_RESULT); 

    DD.Double("BaseDiamondFlow",                 "", idx_BaseDiamondFlow    , MF_RESULT, MC_Qm("Carat/h")); 
    DD.Double("BaseRevenue",                     "", idx_BaseRevenue        , MF_RESULT, MC_MoneyFlow("R/h")); 

    }    
  //Relative Carats
  //% Liberated  
  //Relative Revenue  
  //Rand / hr  



  if (Usage==SPMU_Flow)
    {
    DD.Text("");
    DD.Text("Copy to Clipboard ...");
    DD.Button("Summary",                  "", idx_CopySummary);
    DD.Button("Data as Mass",             "", idx_CopyMass);
    DD.Button("Data as Fractional",       "", idx_CopyFractional);
    }

  if (Usage==SPMU_Image)
    {
    DD.Text("");
    DD.Text("Options ...");
    DD.CheckBox("Calculator",             "",  idx_Calculate, MF_PARAMETER|MF_SET_ON_CHANGE);
    if (m_bCalculate && m_pFeed)
      {
      static MDDValueLst DDSource[]=
        {
          {0,  "CSV"},
          {1,  "XLS"},
          {0}
        };

      DD.Long("Source",     "",  idx_Source, MF_PARAMETER, DDSource);
      DD.String("SrcName",  "",  idx_SrcName, MF_PARAMETER);
      DD.Button("SrcLoad",  "",  idx_SrcLoad, MF_PARAMETER);

      DD.Page("...", true);
      DD.ObjectBegin("LimnDW_Fd",  "OreSizeFeed",  gs_DWCfg.nOreSizes()       );
      CString Tg;
      for (int i=0; i<gs_DWCfg.nOreSizes(); i++)
        {
        Tg.Format("Ore%s",gs_DWCfg.OreSizeText(i));
        DD.Double(Tg, "", &m_pFeed->m_OreSizeFeed[i], gs_DWCfg.nOreSizes()-1?MF_PARAMETER:0, MC_Frac("%"));
        }
      DD.ObjectEnd();
      DD.ObjectBegin("LimnDW_Fd",  "DmdSizeFeed",  gs_DWCfg.nDiamondSizes()   );
      for (int i=0; i<gs_DWCfg.nDiamondSizes(); i++)
        {
        Tg.Format("Dmd%s",gs_DWCfg.DiamondSizeText(i));
        DD.Double(Tg, "", &m_pFeed->m_DmdSizeFeed[i], i<gs_DWCfg.nDiamondSizes()-1?MF_PARAMETER:0, MC_Frac("%"));
        }
      DD.ObjectEnd();
      DD.ObjectBegin("LimnDW_Fd",  "DmdSGFeed",    gs_DWCfg.nSGs()            );
      for (int i=0; i<gs_DWCfg.nSGs(); i++)
        {
        Tg.Format("SG-%s",gs_DWCfg.SGTextShort(i));
        DD.Double(Tg, "", &m_pFeed->m_DmdSGFeed[i], i<gs_DWCfg.nSGs()-1?MF_PARAMETER:0, MC_Frac("%"));
        }
      DD.ObjectEnd();
      }
    }
  };              
Esempio n. 7
0
void BatchPrecip::BuildDataFields()
  {
 static MDDValueLst DDHeatBalance[]=
    {
    {eHBal_Normal, "Normal"},
    {eHBal_ImposedTemp, "Set End Temperature"},
  //  {eHBal_OptimumTemp, "Optimum Temperature"},
    {0}
    };
  DD.Text     ("");
  DD.CheckBox ("On", "",   &m_bOn,  MF_PARAMETER);
  //DD.Text     ("");
  //DD.Text     ("Global options...");
  //DD.Double   ("AmbientTemp",          &HyprodPrecipHelper::m_dAmbientTemp,         MF_PARAMETER, MC_T("C") );
  //DD.Double   ("WindSpeed",            &HyprodPrecipHelper::m_dWindSpeed,           MF_PARAMETER, MC_Ldt);
  //DD.CheckBox ("CompletePopulation",   &Precipitator::sm_bCompletePopulation,  MF_PARAMETER);
  DD.Text     ("Global options...");
  DD.String("Version", "", idDX_Version, MF_RESULT);
  DD.CheckBox ("CompletePopulation", "", &sm_bCompletePopulation, MF_PARAM_STOPPED);
  DD.Show(!sm_bCompletePopulation);
  DD.CheckBox ("UseSSA_from_PopRun", "", &sm_bUsePrevPSD, MF_PARAM_STOPPED);
  DD.Show( (!sm_bUsePrevPSD)&&(!sm_bCompletePopulation)  );
  DD.Double("InTankSSA_of_solids", "", &m_dInTankSSA, MF_PARAMETER,  MC_);  

  DD.Show();
  DD.Text     ("");
  DD.Text     ("Configuration");
  DD.Double   ("Volume", "",               &m_dVolume,              MF_PARAMETER,  MC_Vol ("m^3"));
  DD.Double   ("KvFac", "",                &m_dKvFac,               MF_PARAMETER,  MC_);
  DD.Double   ("Level", "",                &m_dLevel,               MF_PARAMETER,  MC_Frac("%"));
                      
  static MDDValueLst DDModels[]=
    {
    {eAgMdl_dlev,     "WellAgit"},
    {eAgMdl_LowAgit,  "LowAgit"},
    {eAgMdl_HighAgit, "HighAgit"},
    {eAgMdl_SizeInd,  "SizeInd"},
    {eAgMdl_EquiSize, "EquiSize"},
    {eAgMdl_Groneweg, "Groneweg"},
    {0}
    };

   static MDDValueLst NucleatModels[]=
    {
    {eNucl_Hyprod,     "Original Hyprod Model"},
    {eNucl_NBrown, "N.Brown batch model"},
	{eNucl_LowShearRate, "Low shear model"},
	{eNucl_HighShearRate, "High shear model"},
	{eNucl_LowSolidsConc, "Low Solids model"}, 
    {eNucl_Hybrid, "New Hybrid model"}, 
    {0}
    };

  DD.Long("Agglom.Model", "", (long*)&m_eAgloModel,            MF_PARAMETER|MF_SET_ON_CHANGE, DDModels);
  DD.Show(m_eAgloModel==eAgMdl_dlev);
  DD.Double("Param.WellAgit", "",  &m_dAgloParam[eAgMdl_dlev],      MF_PARAMETER);
  DD.Show(m_eAgloModel==eAgMdl_LowAgit);
  DD.Double("Param.LowAgit", "",   &m_dAgloParam[eAgMdl_LowAgit],   MF_PARAMETER);
  DD.Show(m_eAgloModel==eAgMdl_HighAgit);
  DD.Double("Param.HighAgit", "",  &m_dAgloParam[eAgMdl_HighAgit],  MF_PARAMETER);
  DD.Show(m_eAgloModel==eAgMdl_SizeInd);
  DD.Double("Param.SizeInd", "",   &m_dAgloParam[eAgMdl_SizeInd],   MF_PARAMETER);
  DD.Show(m_eAgloModel==eAgMdl_EquiSize);
  DD.Double("Param.EquiSize", "",  &m_dAgloParam[eAgMdl_EquiSize],  MF_PARAMETER);
  DD.Show(m_eAgloModel==eAgMdl_Groneweg);
  DD.Double("Param.Groneweg", "",  &m_dAgloParam[eAgMdl_Groneweg],  MF_PARAMETER);
  DD.Show();
  DD.Long("Nucleat.Model", "", (long*)&m_eNuclModel , MF_PARAMETER|MF_SET_ON_CHANGE, NucleatModels );
  DD.Show(m_eNuclModel==eNucl_LowShearRate || m_eNuclModel==eNucl_HighShearRate ||  m_eNuclModel== eNucl_LowSolidsConc || m_eNuclModel==eNucl_Hybrid);
  DD.Double("ShearRate", "", &m_eShearRate, MF_PARAMETER,  MC_);  
  DD.Show();
  DD.Text("");
  DD.Long("ThermalBalance", "", (long*)&m_eHeatBalance, MF_PARAMETER|MF_SET_ON_CHANGE, DDHeatBalance);
  DD.Show( m_eHeatBalance == eHBal_Normal );
  DD.Double("Surface", "",   &m_dSurface,             MF_PARAMETER,  MC_Area("m^2"));
  DD.Double("UCoef", "",                &m_dUCoef,               MF_PARAMETER,  MC_HTC("kcal/h.m^2.C"));
  DD.Double("InTankCooling", "",  &m_dInTankCooling, ((! m_eHeatBalance == eHBal_Normal) ? MF_RESULT : MF_PARAMETER),MC_Pwr("kcal/h"));
  DD.Show(m_eHeatBalance == eHBal_ImposedTemp );
  DD.Double("DrawOffTemperature", "", &m_dTempImpos,     MF_PARAMETER|MF_NAN_OK                           ,MC_T("C"));
 
  DD.Show();
  DD.Text("");
  DD.Text("Batch Control");
  DD.CheckBox ("CirculationTimeSpecified", "",   &m_bUseCircTime,  MF_PARAMETER);
  DD.Double("CirculationTime", "",   &m_dCirculationTime,  MF_PARAMETER ,MC_Time("h"));
  DD.Double("FillingTime", "",    &m_dFillingTime,  MF_PARAMETER ,MC_Time("h"));
  DD.Double("SeedingTime", "",    &m_dSeedingTime,  MF_PARAMETER ,MC_Time("h"));
  DD.CheckBox ("AgglomerationWhileFilling", "", &m_bAgglomONwhileFilling, MF_PARAMETER);
  DD.Double("DrawOffTime", "",    &m_dDrawOffTime,  MF_PARAMETER ,MC_Time("h"));
  DD.Double("TanksInUse", "",     &m_dNbTankAvailable, (m_dCirculationTime ? MF_PARAMETER : MF_RESULT), MC_);
  DD.Double("SeededPerDay", "",   &m_dNbSeededDay,  (m_dCirculationTime ? MF_RESULT : MF_PARAMETER), MC_);
  DD.Double("FillingTempDrop", "", &m_dFillingTempDrop,  MF_PARAMETER, MC_dT("C"));
  //DD.Double("SeedCharge",   &m_dSeedCharge, MF_PARAMETER, MC_);
  DD.Text("");
  DD.Text("Results");
  DD.Double("Loss2Ambient", "", &m_dLoss2Ambient, MF_RESULT, MC_Pwr("kcal/h"));
  DD.Double("ResidenceTime", "", &m_dResTime, MF_RESULT, MC_Time("h"));
  DD.Double("Yield", "", &m_dYield, MF_RESULT, MC_Conc("g/L"));
  DD.Show(!sm_bCompletePopulation);
  DD.CheckBox ("PrevPSDUsed", "", &m_bPrevPSDUsed, MF_RESULT);
  DD.Show();
  DD.Double("Ti", "", &m_dTempIn, MF_RESULT, MC_T("C"));
  DD.Double("To", "", &m_dTempOut, MF_RESULT, MC_T("C"));
  DD.Double("ACin", "", &m_dACIn, MF_RESULT, MC_);
  DD.Double("ACout", "", &m_dACOut, MF_RESULT, MC_);
  DD.Double("SolidConcIn", "", &m_dSolidConcIn, MF_RESULT, MC_Conc("g/L"));
  DD.Double("SolidConcOut", "", &m_dSolidConcOut, MF_RESULT, MC_Conc("g/L"));

  DD.Object(m_QProd, MDD_RqdPage);
  }
Esempio n. 8
0
void CPrecipitator::BuildDataFields()
{
  static MDDValueLst DDB1[]={
    {GRM_Fixed,   "Fixed" },
    {GRM_White,   "White"},
    {GRM_TTTest, "Test"},
    {0}};

  static MDDValueLst DDB3[]={
    {THL_None,          "None" },
    {THL_TempDrop,      "TempDrop"},
    {THL_FixedHeatFlow, "FixedLoss"},
    {THL_Ambient,  "Ambient"},
    {0}};
  static MDDValueLst DDB5[]={
    { COOL_dQ, "Fixed.dQ"},
    { COOL_dT, "Fixed.dT" },
    { COOL_Hx, "HeatExchange"},
    {0}};
  static MDDValueLst DDB6[]={
    { EVAP_NONE, "None"},
    { EVAP_FIXED, "Fixed"},
    { EVAP_dT, "Ambient" },
    {0}};

  static MDDValueLst DDB7[]={
    { COOL_NONE, "None"},
    { COOL_INTERNAL, "Internal"},
    { COOL_EXTERNAL, "External" },
    {0}};

  DD.Text  ("");

#ifdef TTDEBUG
  DD.CheckBox("TTDBG", "",  &bTTDebug, MF_PARAMETER);
#endif


  DD.CheckBox("On", "",  &bOnLine, MF_PARAMETER|MF_SET_ON_CHANGE);
  //  DD.CheckBox("Int.Cooling", "", &m_bInternalCool, MF_PARAMETER|MF_SET_ON_CHANGE);
  //DD.CheckBox("Ext.Cooling", "", &m_bExternalCool, MF_PARAMETER|MF_SET_ON_CHANGE);
  DD.Long  ("Cooling", "", &iCoolType, MF_PARAMETER|MF_SET_ON_CHANGE, DDB7);

  m_RB.OnOffCheckBox();

  DD.Long  ("Evaporation", "", &iEvapMethod , MF_PARAMETER|MF_SET_ON_CHANGE, DDB6);

  DD.Show(iEvapMethod!=EVAP_NONE);
  DD.Double("Evap.Rate", "",  &m_dEvapRate ,iEvapMethod==EVAP_FIXED?MF_PARAMETER:MF_RESULT, MC_Qm("kg/s"));
  DD.Show(iEvapMethod==EVAP_dT);
  DD.Double("Evap.Per.degK", "",            &m_dEvapRateK         ,MF_PARAMETER, MC_Qm("kg/s"));

  DD.Show();
  DD.Long  ("ThermalLossMethod", "",&iThermalLossMethod, MF_PARAMETER|MF_SET_ON_CHANGE, DDB3);
  DD.Show(iThermalLossMethod==THL_TempDrop);
  DD.Double("Temp_Drop", "",        &dTempDropRqd     ,MF_PARAMETER, MC_dT("C"));
  DD.Show(iThermalLossMethod==THL_FixedHeatFlow);
  DD.Double("ThermalLossRqd", "",   &dThermalLossRqd  ,MF_PARAMETER, MC_Pwr("kW"));
  DD.Show(iThermalLossMethod==THL_Ambient);
  DD.Double("ThermalLossAmbient", "",  &dThermalLossAmbient ,MF_PARAMETER, MC_UA);
  DD.Show();
  DD.Text("");
  DD.Text  ("Requirements");
  DD.Double("TankVol", "",	        &dTankVol         ,MF_PARAMETER, MC_Vol("m^3"));
  DD.Text  ("");
  DD.Text  ("Results Tank");
  DD.Double("ResidenceTime", "",    &dResidenceTime ,MF_RESULT, MC_Time("h"));
  DD.Double("SuperSat", "", &m_dSSat, MF_RESULT, MC_);
  DD.Double("Yield", "",            &dYield         ,MF_RESULT, MC_Conc("kg/m^3"));
  DD.Double("THA.Precip", "",        &dTHAPrecip     ,MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Solids.Precip", "",    &dSolPrecip     ,MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Solids.Conc", "",    &dSolConc     ,MF_RESULT,  MC_Conc("kg/m^3"));

    
  DD.Text  ("Results");         
  DD.Show();                    
  DD.Double("Vol_FlowIn", "",       &dQvin          ,MF_RESULT, MC_Qv("L/s"));
  DD.Double("Vol_FlowOut", "",      &dQvout         ,MF_RESULT, MC_Qv("L/s"));

  DD.Double("MassFlowIn", "",       &dQmin          ,MF_RESULT, MC_Qm("t/d"));
  DD.Double("MassFlowOut", "",      &dQmout         ,MF_RESULT, MC_Qm("t/d"));
  
  DD.Double("ACin", "",             &dACin          ,MF_RESULT, MC_);
  DD.Double("ACout", "",            &dACout         ,MF_RESULT, MC_);
  DD.Double("ACequil", "",          &m_dACeq        ,MF_RESULT, MC_);


  DD.Double("TempIn", "",           &dTin           ,MF_RESULT, MC_T("C"));
  DD.Double("TempOut", "",          &dTout          ,MF_RESULT, MC_T("C"));
  DD.Text("");
  
  DD.Page("Precip");
  DD.Long  ("GrowthMethod", "", (long*)&iGrowthRateMethod, MF_PARAMETER|MF_SET_ON_CHANGE, DDB1);
  DD.Double("Convergence.Limit", "",   &m_dConvergenceLimit, MF_PARAMETER|MF_INIT_HIDDEN, MC_);
  DD.Double("Thermal.Damping", "",   &m_dDamping, MF_PARAMETER|MF_INIT_HIDDEN, MC_Frac("%"));
  DD.Double("Mass.Damping", "",   &m_dMassDamping, MF_PARAMETER|MF_INIT_HIDDEN, MC_Frac("%"));
  DD.Double("Vol.Damping", "",   &m_dVolDamping, MF_PARAMETER|MF_INIT_HIDDEN, MC_Frac("%"));
  
  DD.Show (iGrowthRateMethod==GRM_Fixed);
  DD.Double("Precip.Rate", "",      &dGrowthRate    ,MF_PARAMETER, MC_Qm("kg/s"));
  DD.Show (iGrowthRateMethod==GRM_White);
  DD.Double("ER_White", "",         &ER_White        ,MF_PARAMETER, MC_T("K"));
  DD.Double("K_White", "",	        &K_White         ,MF_PARAMETER, MC_);
  DD.Double("gF_White", "",    	    &gF_White        ,MF_PARAMETER, MC_);
  DD.Double("K_SODA", "", &m_dK_Soda, MF_PARAMETER, MC_);
  DD.Double("E_SODA", "", &m_dE_Soda, MF_PARAMETER, MC_);
  


  DD.Show (iGrowthRateMethod==GRM_TTTest);
  DD.Double("ActivationEnergy", "",    	    &m_dActivationEnergy    ,MF_PARAMETER, MC_T("K"));
  DD.Double("K0", "",    	    &m_dK0   		    ,MF_PARAMETER, MC_);
  DD.Double("K1", "",    	    &m_dK1   		    ,MF_PARAMETER, MC_);
  DD.Double("k_TOC", "",    	    &m_dk_TOC		    ,MF_PARAMETER, MC_);
  DD.Double("n_s", "",    	    &m_dn_s  		    ,MF_PARAMETER, MC_);
  DD.Double("n_fc", "",    	    &m_dn_fc 		    ,MF_PARAMETER, MC_);
  DD.Double("n_eq", "",    	    &m_dn_eq 		    ,MF_PARAMETER, MC_);
  DD.Double("n_", "",    	    &m_dn_   		    ,MF_PARAMETER, MC_);
  DD.Double("n_sol", "",    	    &m_dn_sol		    ,MF_PARAMETER, MC_);
  DD.Double("n_ssa", "",    	    &m_dn_ssa		    ,MF_PARAMETER, MC_);
  DD.Double("SSAin", "",    	    &m_dSSAin		    ,MF_RESULT, MC_SurfAreaM);
  DD.Double("SSA", "",    	    &m_dSSA		    ,MF_PARAMETER, MC_SurfAreaM);

  DD.Show (iGrowthRateMethod!=0);

  DD.Double("BoundSoda_OrgPart","", &m_dBndOrgSoda          ,MF_PARAMETER, MC_Frac("%"));

  

  DD.Show();
  DD.Text("Thermal and Mass Balance");
  DD.Double("Mass.Flow.In", "",       &dQmin          ,MF_RESULT|MF_NO_FILING, MC_Qm("t/d"));
  DD.Double("Mass.Flow.Out", "",      &dQmout         ,MF_RESULT|MF_NO_FILING, MC_Qm("t/d"));
  DD.Show(iEvapMethod!=0);
  DD.Double("Evap.Mass.Loss", "", &m_dEvapRate, MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Evap.Thermal.Loss", "",   &m_dEvapThermalLoss  ,MF_RESULT, MC_Pwr("kW"));
  DD.Show(iThermalLossMethod==THL_Ambient);
  DD.Double("Env.Thermal.Loss", "", &m_dEnvironmentLoss, MF_RESULT, MC_Pwr("kW"));  
  DD.Show(iCoolType!=0);
  DD.Double("Cooler.Thermal.Loss", "", &m_dCoolRate, MF_RESULT, MC_Pwr("kW")); // Ext Cooling Rate
  DD.Double("ReactionHeat", "",     &dReactionHeat  ,MF_RESULT, MC_Pwr("kW"));
  DD.Double("Total.Thermal.Loss", "", &m_dTotThermalLoss, MF_RESULT, MC_Pwr("kW"));
  DD.Text("Stream.Enthalpy");
  DD.Double("HzIn", "", &m_dHIn, MF_RESULT, MC_Pwr);
  DD.Double("HzEvap", "", &m_dHEvap, MF_RESULT, MC_Pwr);
  DD.Double("HzOut", "", &m_dHOut, MF_RESULT, MC_Pwr);
  DD.Double("HzBal", "", &m_dHBal, MF_RESULT, MC_Pwr);

  DD.Show(iCoolType!=0);
  DD.Page("Cooler");
  DD.Show(iCoolType==COOL_INTERNAL);
  DD.CheckBox("Cooler.On", "",  &m_bCoolerOn, MF_PARAMETER);
  DD.Long  ("Cooling.Type", "", (long*)&iCoolMethod, MF_PARAMETER|MF_SET_ON_CHANGE, DDB5);

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_dT));
  DD.Double("dT", "", &m_dCooldT, MF_PARAMETER, MC_dT("C")); 

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_dQ));
  DD.Double("dQ",  "", &m_dCooldQ, MF_PARAMETER, MC_Pwr("kW")); 

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_Hx));
  DD.Double("HX.Area",  "", &m_dCoolArea, MF_PARAMETER, MC_Area("m^2")); 
  DD.Double("HX.HTC",  "", &m_dCoolHTC, MF_PARAMETER, MC_HTC);
  DD.Show(iCoolType==COOL_EXTERNAL || (iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_Hx)));
  DD.CheckBox("By.Vol.Flow", "",  &m_bByVolFlow, MF_PARAMETER|MF_SET_ON_CHANGE);

  DD.Show(iCoolType==COOL_INTERNAL && (iCoolMethod==COOL_Hx));
  DD.Double("Cooling.Flow",  "", &m_dCoolFlow,
	    m_bByVolFlow ? MF_RESULT : MF_PARAMETER, MC_Qm("kg/s")); // Internal cooling flow
  DD.Double("Int.Vol.Flow", "", &m_dIntCoolVolFlow, 
	    m_bByVolFlow ? MF_PARAMETER : MF_RESULT, MC_Qv("m^3/s")); // By Volume

  DD.Double("Hx.UA", "", &m_dUA, MF_RESULT, MC_UA);
  DD.Double("Hx.LMTD", "", &m_dLMTD, MF_RESULT, MC_dT);

  DD.Double("Water.Flow",  "", &m_dCoolWaterFlow, MF_RESULT, MC_Qm("kg/s"));
  DD.Double("Water.Vol.Flow",  "", &m_dCoolWaterFlowVol, MF_RESULT, MC_Qv);

  DD.Double("Water.Tin",  "", &m_dCoolWaterTin, MF_RESULT, MC_T("C"));
  DD.Double("Water.Tout",  "", &m_dCoolWaterTout, MF_RESULT, MC_T("C"));
  DD.Double("Liquor.Tin",  "", &m_dLiquorTin, MF_RESULT, MC_T("C"));
  DD.Double("Liquor.Tout",  "", &m_dLiquorTout, MF_RESULT, MC_T("C"));
  DD.Show(iCoolType==COOL_EXTERNAL);
  DD.Double("Ext.Vol.Flow", "", &m_dExtCoolVolFlow, 
	    m_bByVolFlow ? MF_PARAMETER : MF_RESULT, MC_Qv("m^3/s")); // Ext Cooling.Flow
  DD.Double("Ext.Cooling.Flow", "", &m_dExtCoolFlow, 
	    m_bByVolFlow ? MF_RESULT : MF_PARAMETER, MC_Qm("kg/s")); // Ext Cooling.Flow

  DD.Double("Ext.Cooling.Temp", "", &m_dExtCoolTemp, MF_RESULT, MC_T("C")); // Ext Cooling.Temp
  DD.Double("Ext.Cooling.totHz", "", &m_dCoolOutTotHz , MF_RESULT, MC_Pwr("kW")); // Ext Cooling Rate
  DD.Show(iCoolType!=0);
  DD.Double("Cooling.Rate", "", &m_dCoolRate, MF_RESULT, MC_Pwr("kW")); // Ext Cooling Rate


  if (!m_bEvapConnected && iEvapMethod!=EVAP_NONE) //if optional Evap is NOT connected and evaporation functionality is required show the output stream
    DD.Object(Evap, MDD_RqdPage);

  DD.Show(m_RB.Enabled());  
  DD.Page("RB");
  m_RB.BuildDataFields();
  DD.Show();
}