/*#F:This provides access to the variables of the model.*/ void X_Comp::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Text(""); DDB.Double ("","PowerMaximum", DC_Pwr, "kW", &P_MaxPower, this ,isParm); DDB.Double ("","Psetpoint", DC_P, "kPag", &P_SetpointPressure, this ,isParm); DDB.Double ("","Polytropic_Eff", DC_Frac, "%", &P_PolytropicEff, this ,isParm); DDB.Double ("","Compressability", DC_, "", &P_Compressability, this ,isParm); DDB.Text(""); DDB.Byte ("","Status", DC_, "", &P_Status, this ,isParm, DDBOnOff); DDB.Text(""); static DDBValueLst DDB0[] = { {0, "Pressure"}, {1, "Speed"}, {0}}; DDB.Byte ("","Control", DC_, "", &Control, this ,isParm|SetOnChange|AffectsStruct, DDB0); dword IsPress=Control==0; dword IsSpeed=Control==1; DDB.Double ("","MinSpeed", DC_pS, "rpm", &MinSpeed, this ,(IsSpeed?0:noView)|isParm); DDB.Double ("","MaxSpeed", DC_pS, "rpm", &MaxSpeed, this ,(IsSpeed?0:noView)|isParm); DDB.Double ("","SpdTC", DC_Time, "s", &SpdTau, this ,(IsSpeed?0:noView)|isParm); DDB.Double ("","SpdSpt", DC_Frac, "%", &SpdSpt, this ,(IsSpeed?0:noView)|isParm); DDB.Double ("","SpdFbk", DC_Frac, "%", &SpdFbk, this ,(IsSpeed?0:noView)); DDB.Double ("","Speed", DC_pS, "rpm", &ActSpeed, this ,(IsSpeed?0:noView)); DDB.Double ("","NetBoost", DC_DP, "kPa", &TheBoost, this ,(IsSpeed?0:noView)|InitHidden); DDB.Double ("","SpeedRatio", DC_Frac, "%", &SpeedRatio, this ,(IsPress?0:noView)|isParm|NAN_OK); // Why? - CNM DDB.Text(""); DDB.Text(""); DDB.Double ("","SpecificHheaRat", DC_Frac, "%", &P_SpecificHeatRatio, this ,0); DDB.Double ("","MolecularWeight", DC_, "", &P_MolecularWeight, this ,0); DDB.Double ("","MMSCFD", DC_, "", &MFlow, this ,0); DDB.Double ("","Pin", DC_P, "kPag", &Pin, this ,0); DDB.Double ("","Pout", DC_P, "kPag", &Pout, this ,0); DDB.Double ("","Qin", DC_Qm, "kg/s", &QinFlange, this ,0); DDB.Double ("","Qout", DC_Qm, "kg/s", &QoutFlange, this ,0); DDB.Double ("","QvSrg", DC_Qv, "m^3/s",&QvSrg, this ,0); DDB.Double ("","QvIn", DC_Qv, "m^3/s",&QvIn, this ,0); DDB.Double ("","Tin", DC_T, "C", &Tin, this ,0); DDB.Double ("","Tout", DC_T, "C", &Tout, this ,0); DDB.Double ("","PowerUsage", DC_Pwr, "kW", &CurrentPow, this ,0); DDB.Text(""); DDB.Object(&SurgeCondition, this, NULL, "TestComment 1",DDB_RqdPage); DDB.Object(&Efficiency, this, NULL, "TestComment 2",DDB_RqdPage); DDB.Object(&Speed, this, NULL, "TestComment 3",DDB_RqdPage); DDB.EndStruct(); };
/*This provides access to the variables of the model and calls the BuildDataDefn for objects used by the model.*/ void CentrifugeMB::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Text (" "); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, isResult|0); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &m_QmAcc, this, isResult|0); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &m_QvAcc, this, isResult|0); DDB.Visibility(); DDB.Text (""); DDB.Text ("Requirements"); DDB.CheckBox("On", "", DC_, "", &fOn, this, isParm); if (PrjFileVerNo()<49) DDB.Double ("", "SolidLoss", DC_Frac, "%", &RqdSolidsToFiltrate, this, isParm);//SolidLoss else DDB.Double ("Rqd_Solids_To_Filtrate", "RqdSolToFilt", DC_Frac, "%", &RqdSolidsToFiltrate,this, isParm);//SolidLoss DDB.Double ("Rqd_Cake_Moisture", "RqdCakeMoist", DC_Frac, "%", &RqdCakeMoist, this, isParm); DDB.Double ("Rqd_Wash_Efficiency", "RqdWashEff", DC_Frac, "%", &WashEff, this, isParm); DDB.Text (""); DDB.Text ("Results"); //DDB.Double ("Wash_Efficiency", "WashEff", DC_Frac, "%", &ActWashEff, this, isResult);//|noFile|noSnap); DDB.Double ("Cake_Moisture", "CakeMoist", DC_Frac, "%", &ActCakeLiq, this, isResult);//|noFile|noSnap); DDB.Double ("Cake_Solids", "CakeSolids", DC_Frac, "%", &ActCakeSolids, this, isResult);//|noFile|noSnap); DDB.Double ("Filtrate_Solids", "FiltSolids", DC_Frac, "%", &ActFiltSolids, this, isResult);//|noFile|noSnap); DDB.Double ("FiltrateSolidsConc@25", "FiltSolConc25", DC_Conc, "g/L", &ActFiltSolConc, this, isResult);//|noFile|noSnap); DDB.Double ("FiltrateSolidsConc@T", "FiltSolConc@T", DC_Conc, "g/L", &ActFiltSolConcT, this, isResult);//|noFile|noSnap|InitHidden); DDB.Visibility(NM_Probal|SM_All|HM_All); //DDB.Byte ("", "ScanEffSpecie", DC_, "", &iScanEffSpecie, this, isParm, SDB.DDBLiqSpList()); //DDB.Double ("Scandrett_Wash_Eff", "ScandrettEff", DC_Frac, "%", &ActScandrettEff, this, isResult);//|noFile|noSnap); DDB.Byte ("", "WashComp", DC_, "", &iWashEffSpecie, this, isParm, SDB.DDBLiqSpList()); DDB.Double ("", "CompWashEff1", DC_Frac, "%", &dSpWashEff, this, isResult);//|noFile|noSnap); DDB.Double ("", "CompWashEff2", DC_Frac, "%", &dSpWashEff2, this, isResult);//|noFile|noSnap); //DDB.Visibility(NM_Dynamic|SM_All|HM_All); //DDB.Bool ("", "CakeDisch?", DC_ , "", &Disch, this, isParm, DDBYesNo); DDB.Visibility(); DDB.Text (" "); m_RB.Add_OnOff(DDB); m_EHX.Add_OnOff(DDB); DDB.Text (" "); BuildDataDefnShowIOs(DDB); m_RB.BuildDataDefn(DDB); m_EHX.BuildDataDefn(DDB); if (SolveSurgeMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.EndStruct(); }
void CrushBlk::Add_StandardDataDefn(DataDefnBlk & DDB, flag Vis) { DDEF_Flags Old = DDB.GetVisibility(); DDB.Visibility(NSHM_All, Vis); DDB.Text(""); DDB.CheckBox("TrackStatus", "", DC_, "", &bTrackStatus, this, isParm); static DDBValueLst DDB0[]={ {(int)CM_PartCrv_Overall, "Overall_PartCrv"}, {(int)CM_PartCrv_Individ, "Individual_PartCrv" }, {(int)CM_SelBreak, "Select/Break"}, {(int)CM_TestData_Overall, "Overall_TestData"}, {(int)CM_TestData_Individ, "Individual_TestData" }, //{(int)CM_JK, "JK" }, {0}}; DDB.Byte ("Method", "", DC_, "", xidMethod, this, isParmStopped/*|DDEF_SETONCHANGE*/, DDB0); DDB.Visibility(NSHM_All, Vis && (iMethod==CM_PartCrv_Overall || iMethod==CM_PartCrv_Individ)); DDB.CheckBox("ForcePartCrv", "", DC_, "", &bForcePartCrv, this, isParm, DDBYesNo); DDB.Visibility(NSHM_All, Vis && (iMethod==CM_TestData_Overall || iMethod==CM_TestData_Individ)); DDB.CheckBox("EnterExtents", "", DC_, "", xidEnterExtents, this, isParmStopped, DDBYesNo); DDB.Visibility(NSHM_All, Vis && (iMethod==CM_JK)); DDB.Double("", "K1", DC_L, "mm", &dK1, this, isParm); DDB.Double("", "K2", DC_L, "mm", &dK2, this, isParm); DDB.Double("", "K3", DC_, "", &dK3, this, isParm); DDB.Double("", "t10", DC_, "", &dt10, this, isParm); //DDB.Visibility(NSHM_All, Vis); DDB.SetVisibility(Old); }
void PL_SoftStSp::BuildDataDefn(DataDefnBlk & DDB) { DDB.Byte("Mode", "", DC_, "", &iMode, this, isParm, DDBPmpStartMode); DDB.Byte("FwdRevMode", "", DC_, "", &iFwdRev, this, isParm, DDBFwdRevMode ); switch (iMode) { case 0: DDB.CheckBoxBtn("Enable", "Run", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Invert", "", DC_, "", &bStartInv,this, isParm, DDBOnOff); break; case 1: case 2: DDB.CheckBoxBtn("Permissive", "", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Start", "", DC_, "", &bStart, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Stop", "", DC_, "", &bStop, this, isParm, DDBOnOff); DDB.CheckBoxBtn("StartInvert","", DC_, "", &bStartInv,this, isParm, DDBOnOff); DDB.CheckBoxBtn("StopInvert", "", DC_, "", &bStopInv, this, isParm, DDBOnOff); break; } if (iFwdRev==PLSS_FwdRevLogic) DDB.CheckBoxBtn("Reverse", "", DC_, "", &bRunRev, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Running", "", DC_, "", &bRunning, this, 0, DDBOnOff); DDB.CheckBoxBtn("Tripped", "", DC_, "", &bTripped, this, isParm, DDBOnOff); DDB.Double("StartTime", "StrtTime", DC_Time, "s", &dStartTime, this, isParm); DDB.Double("StopTime", "StopTime", DC_Time, "s", &dStopTime, this, isParm); DDB.Double("LocalY", "Manual", DC_Frac, "%", &m_dManualSpeed, this, isParm|NAN_OK); DDB.Double("Required", "Reqd", DC_Frac, "%", &m_dSpeedReqd, this, isParm); DDB.Double("Actual", "Actual", DC_Frac, "%", &m_dSpeed, this, isResult|0); DDB.Double("", "Regulated", DC_Frac, "%", &m_dSpeedReg, this, isResult); DDB.Double("MapLo", "", DC_Frac, "%", &dMapLo, this, isParm); DDB.Double("MapHi", "", DC_Frac, "%", &dMapHi, this, isParm); DDB.Double("MapSpeed", "", DC_Frac, "%", &m_dMapSpeed, this, isResult|0); DDB.Bool ("LoSpeed", "", DC_, "", &bLoSpeed, this, isResult); DDB.Bool ("HiSpeed", "", DC_, "", &bHiSpeed, this, isResult); DDB.Float ("LoSpeedLimit", "", DC_Frac, "%", &dLoSpeedLimit,this, isParm|InitHidden); DDB.Float ("HiSpeedLimit", "", DC_Frac, "%", &dHiSpeedLimit,this, isParm|InitHidden); DDB.CheckBoxBtn("AutoReStart", "", DC_, "", &m_bAutoRestart, this, isParm, DDBOnOff); DDB.Byte("FailMode", "", DC_, "", &iFailMode, this, isParm, DDBPmpFailMode); DDB.CheckBoxBtn("RunMemory", "", DC_, "", &bRunMemory, this, InitHidden, DDBOnOff); //if (m_pPwr) // m_pPwr->BuildDataDefn(DDB); };
void CBlockEvaluator::Add_OnOff(DataDefnBlk &DDB, DDBPages PageIs) { BOOL DoIt=true; if (PrjFileVerNo()>=99) DoIt=DDB.BeginObject(m_pNd, "EB", "EB_Slct", 0, DDB_NoPage); if (DoIt) { DDB.String("", "EvalSeq.Feed", DC_, "", &m_sBlkSeqFeed, m_pNd, 0); if (StateSemanticsOn()) DDB.String("", "EvalSeq.Content", DC_, "", &m_sBlkSeqState, m_pNd, 0); if (m_Options&BEO_WithMakeups) DDB.Long("Makeups", "", DC_, "", xidNMakeups, m_pNd, isParmStopped|SetOnChange); if (m_Options&BEO_WithBleeds) DDB.Long("Bleeds", "", DC_, "", xidNBleeds, m_pNd, isParmStopped|SetOnChange); //DDB.Text(""); if (m_Options&BEO_WithMakeups) { for (int a=0; a<m_pMakeups.GetSize(); a++) m_pMakeups[a]->Add_OnOff(DDB, isParmStopped|SetOnChange, 100000+a*1000); } if (m_pRB) m_pRB->Add_OnOff(DDB, isParmStopped|SetOnChange); if (m_pHX) m_pHX->Add_OnOff(DDB, isParmStopped|SetOnChange); if (m_pEHX) m_pEHX->Add_OnOff(DDB, isParmStopped|SetOnChange); if (m_pVLE) m_pVLE->Add_OnOff(DDB, isParmStopped|SetOnChange); if (m_pEvap) m_pEvap->Add_OnOff(DDB, isParmStopped|SetOnChange); if (m_Options&BEO_WithBleeds) { for (int a=0; a<m_pBleeds.GetSize(); a++) m_pBleeds[a]->Add_OnOff(DDB, isParmStopped|SetOnChange, 200000+a*1000); } } if (PrjFileVerNo()>=99) DDB.EndObject(); if (PrjFileVerNo()<99 && (DDB.DoingPutData() && DDB.ForFileSnpScn() || 0)) { static DDBValueLst DDBBS[]={ {0, "RB EHX VLE" }, {1, "EHX RB VLE" }, {0}}; DDB.Byte("BlockActionSeq", "", DC_, "", xidOldBlkSeq, m_pNd, isParmStopped, DDBBS); } DDB.Text(""); };
void PL_FwdRev::BuildDataDefn(DataDefnBlk & DDB) { DDB.Byte("Mode", "", DC_, "", &iMode, this, isParm, DDBPmpStartMode); switch (iMode) { case 0: DDB.CheckBoxBtn("Enable", "Run", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Invert", "", DC_, "", &bStartInv,this, isParm, DDBOnOff); break; case 1: case 2: DDB.CheckBoxBtn("Permissive", "", DC_, "", &bOn, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Start", "", DC_, "", &bStart, this, isParm, DDBOnOff); DDB.CheckBoxBtn("Stop", "", DC_, "", &bStop, this, isParm, DDBOnOff); DDB.CheckBoxBtn("StartInvert","", DC_, "", &bStartInv,this, isParm, DDBOnOff); DDB.CheckBoxBtn("StopInvert", "", DC_, "", &bStopInv, this, isParm, DDBOnOff); break; } DDB.CheckBoxBtn("Running", "", DC_, "", &bRunning, this, 0, DDBOnOff); DDB.CheckBoxBtn("Tripped", "", DC_, "", &bTripped, this, isParm, DDBOnOff); //DDB.Add_OnOff("State", &bOn, False, this); //DDB.Add_YesNo("Forward", &bFwd, False, this); DDB.CheckBoxBtn("Forward", "", DC_, "", &bFwd, this, isParm, DDBYesNo); DDB.Double("LocalY", "Manual", DC_Frac, "%", &m_dManualSpeed, this, isParm|NAN_OK); DDB.Double("Speed", "Reqd", DC_Frac, "%", &m_dSpeedReqd, this, isParm); DDB.Double("", "Actual", DC_Frac, "%", &m_dSpeed, this, 0); DDB.Double("", "Regulated", DC_Frac, "%", &m_dSpeedReg, this, isResult); DDB.Bool ("LoSpeed", "", DC_, "", &bLoSpeed, this, isResult); DDB.Bool ("HiSpeed", "", DC_, "", &bHiSpeed, this, isResult); DDB.Float ("LoSpeedLimit", "", DC_Frac, "%", &dLoSpeedLimit,this, isParm|InitHidden); DDB.Float ("HiSpeedLimit", "", DC_Frac, "%", &dHiSpeedLimit,this, isParm|InitHidden); DDB.CheckBoxBtn("AutoReStart", "", DC_, "", &m_bAutoRestart, this, isParm, DDBOnOff); DDB.Byte("FailMode", "", DC_, "", &iFailMode, this, isParm, DDBPmpFailMode); DDB.CheckBoxBtn("RunMemory", "", DC_, "", &bRunMemory, this, InitHidden, DDBOnOff); //if (m_pPwr) // m_pPwr->BuildDataDefn(DDB); }
void TE_KFact::BuildDataDefn(DataDefnBlk & DDB) { KConst.BuildDataDefn(DDB, "KConst", "", DC_, "", xidKConst, NULL, "Initial", "Required"); DDB.Byte ("Type", "", DC_, "", &iType, NULL, isParm|SetOnChange, DDBTT); DDB.Double ("PipeDiam", "D-Pipe", DC_L, "mm", xidPDiam, NULL, isParmStopped); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3",&dDensMeas, NULL, isResult); DDB.Double ("Viscosity", "Visc", DC_Visc,"cP", &dViscMeas, NULL, isResult); DDB.Double ("Velocity", "Vel", DC_Ldt, "m/s", &dVelMeas, NULL, isResult); DDB.Double ("FricFac", "fT", DC_, "", &dFricFac, NULL, isResult); m_PhD.KFact.BuildDataDefn(DDB, "ResistCoeff", "K", DC_, "", xidKFact, NULL, "Calculated", "Required"); DDB.Double ("PressDrop", "DP", DC_DP, "kPa", &m_dDP, NULL, isResult); BuildDataDefnOveride(DDB); };
/*#F:This provides access to the variables of the model and calls the BuildDataDefn for objects used by the model.*/ void CElectroCell::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, isResult|0); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &m_QmAcc, this, isResult|0); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &m_QvAcc, this, isResult|0); DDB.Text (""); DDB.Byte ("Plated_Metal?", "Metal?", DC_, "", &iMetal, this, isParm, SDB.DDBSolSpList()); DDB.Double ("Cathode_Mass", "Cathodes", DC_, "", &CathMass, this, isResult|0); DDB.Visibility(); DDB.Text (""); DDB.Double ("CellEfficiency","Cell_Eff", DC_Frac, "%", &dCellEff, this, isParm); //DDB.Double ("", "PreHeatFrac", DC_Frac, "%", &dPreHeatFrac, this, isParm); //possibly not needed? //DDB.Double ("", "EnergyRqd", DC_Pwr, "kW", &dHeatFlow, this, isResult|noFileAtAll|InitHidden); //DDB.Double ("", "HeatFlow", DC_Pwr, "kW", &dHeatFlow, this, isResult|0); DDB.Double ("", "ElecEnergyTotal", DC_Pwr, "kW", &m_dElecEnergyTotal, this, isResult|0); DDB.Double ("", "ElecEnergyReact", DC_Pwr, "kW", &m_dElecEnergyReact, this, isResult|0); DDB.Double ("", "ElecEnergyHeat", DC_Pwr, "kW", &m_dElecEnergyHeat , this, isResult|0); DDB.Text (""); DDB.Double ("TempFeed", "Feed.T", DC_T, "C", &m_TempKFeed, this, isResult);//|noFileAtAll); DDB.Double ("FinalT", "", DC_T, "C", &m_TempKProd, this, isResult|0); DDB.Text (""); m_RB.Add_OnOff(DDB); DDB.Visibility(); DDB.Text (""); BuildDataDefnShowIOs(DDB, true); BuildDataDefnIOOpts(DDB); m_RB.BuildDataDefn(DDB); if (SolveSurgeMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.Visibility(NM_Dynamic|SM_All|HM_All); //if (Contents.SpillExists()) // DDB.Object(&Contents.OverFlow, this, NULL, NULL, DDB_RqdPage); DDB.Visibility(); DDB.EndStruct(); };
void CSzSSA::BuildDataDefn(DataDefnBlk & DDB) { // DDB.CheckBox("SetSAM", "", DC_, "", &m_bSetSAM, this, m_bSAMCalcd ? 0 : isParm); if (DDB.BeginStruct(this, "SSA", 0)) { DDB.Byte ("", "Method", DC_, "", &m_iMethod, this, 0/*isParm*/, DDBMeth); DDB.Visibility(NSHM_All ,m_iMethod==SSA_Independent); if (!DDB.ForFileSnpScn()) DDB.CheckBoxBtn("SetData", "", DC_, "", xidSSAAllowSet, this, isParm); DDB.Long ("", "Solids", DC_, "", &m_iSolids, this, (m_bHasPSD || !DataSettable()) ? 0 : isParm, SDB.DDBSolSpListDash()); DDB.Visibility(); DDB.Double ("SeedSurfAreaM", "SAM", DC_SurfAreaM, "m^2/g", xidSSAPartSAM, this, (m_bHasPSD || !DataSettable()) ? 0 : isParm); DDB.Double ("SeedSurfAreaL", "SAL", DC_SurfAreaL, "m^2/L", xidSSAPartSAL, this, noFile); DDB.Double ("#/s", "", DC_, "", xidSSAPartNoperSec, this, noFile|InitHidden); DDB.Double ("#/L", "", DC_, "", xidSSAPartNoperVol, this, noFile|InitHidden); DDB.Double ("PartDiam", "D", DC_L, "um", xidSSAPartDiam, this, ((m_bHasPSD || !DataSettable()) ? 0 : isParm)|noFile); DDB.Double ("SolidsQm", "", DC_Qm, "kg/s", xidSSAPartSolidsQm, this, noFile|InitHidden); } DDB.EndStruct(); }
void Crusher::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); BuildDataDefnElevation(DDB); DDB.Text(""); DDB.Text(""); static DDBValueLst DDB0[]={ {CM_PartCrv, "PartitionCrv"}, {CM_SelBreak, "Select/Break"}, {0}}; DDB.Byte ("Method", "", DC_, "", &iMethod, this, isParm|DDEF_SETONCHANGE, DDB0); //? DDB.Bool("UseSelBrk", "", DC_, "", &fUseSelBrk, this, isParm, DDBYesNo); DDB.Text(""); DDB.Double("Bond_WI", "Bond_WI", DC_WI , "kWh/t", &BWI , this, isParm); DDB.Double("Calc_Power", "CalcPower", DC_Pwr, "kW", &Power, this, isResult|0); //DDB.Double("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, 0); //DDB.Double("Level", "Lvl", DC_Frac, "%", xidLevel, this, 0); MSB.BuildDataDefn(DDB, this, "Speed", 1); m_Pwr.BuildDataDefn(DDB); //DDB.Object(&BWDist, this); //DDB.Object(&EDist, this); if (iMethod==CM_SelBreak) DDB.Object(&SelBrk, this); else DDB.Object(&DischPart, this); DDB.Object(&Disch, this, NULL, NULL, DDB_RqdPage); DDB.EndStruct(); };
/*This provides access to the variables of the model and calls the BuildDataDefn for objects used by the model.*/ void BeltCnv::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); //DDB.Page ("Parms"); DDB.Text (""); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Text(""); DDB.Double ("BeltSpeed", "", DC_Ldt, "m/s", xidBeltSpeed, this, isResult); DDB.Visibility(); DDB.Double ("Length", "L", DC_L, "m", xidBeltLength, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Double ("MaxSpeed", "", DC_Ldt, "m/s", &m_MaxVelocity, this, isParm); DDB.Double ("MaxLoading", "MaxSpillLoad", DC_MpL, "kg/m", &m_MaxSpillLoading, this, isParm); DDB.Double ("MinLoading", "", DC_MpL, "kg/m", &m_MinLoading, this, isParm|InitHidden); DDB.Long ("MaxTurndown", "", DC_, "", &m_MaxTurnDown, this, isParm|InitHidden); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Double ("", "MaxStallLoad", DC_M, "kg", &m_MaxStallLoading, this, isParm); DDB.CheckBox("", "StartIfStalled", DC_, "", &m_fStartIfStalled, this, isParm); DDB.Byte ("", "WasRunning", DC_, "", &m_fWasRunning, this, isResult|InitHidden); DDB.Double ("TotalMass", "", DC_M, "kg", xidTotalMass, this, isResult); DDB.Double ("AvgLoading", "", DC_MpL, "kg/m", xidAvgLoading, this, isResult); if (OrigPrjFileVerNo()<90 && DDB.ForFileSnpScn()) DDB.String ("SpillArea", "", DC_, "", &m_sAreaTag, this, isParmStopped); DDB.Double ("TotalSpilt", "", DC_M, "kg", xidTotSpilt, this, isParm); DDB.Double ("TotalVented", "", DC_M, "kg", xidTotVented, this, isParm); DDB.Page("BeltDrive", DDB_RqdPage); DDB.Text ("Power Draw"); DDB.Double ("NoLoadPower", "", DC_Pwr, "kW", &m_NLPower, this, isParm); DDB.Double ("FullLoadPower","", DC_Pwr, "kW", &m_FLPower, this, isParm); DDB.Double ("Power", "", DC_Pwr, "kW", &m_Power, this, isResult); DDB.Text(""); m_Pwr.BuildDataDefn(DDB); m_BeltSB.BuildDataDefn(DDB, this, "Speed", 1); DDB.Visibility(); DDB.Text(""); DDB.Long ("NoWtMtrs", "", DC_, "", xidNWtMtrs, this, isParm); static DDBValueLst DDB1[] = { {QPT_None, "None" }, {QPT_FixedPts, "Fixed Points"}, {QPT_AllSections, "All Section Pts"}, {QPT_MinSections, "Min Section Pts"}, {0}}; DDB.CheckBox("ShowProfile", "", DC_, "", xidShowProf, this, isParm|SetOnChange); DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_fShowProfile); DDB.Long ("ProfDispType", "", DC_, "", xidProfDispType, this, isParm, DDB1); //DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_fShowProfile && m_ProfDispType==QPT_FixedPts); //DDB.Long ("ProfilePts", "", DC_, "", xidProfPts, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.Long ("NSections", "", DC_, "", xidNSections, this, isResult); if (DDB.BeginStruct(this, "MinSect", 0, DDB_NoPage)) { DDB.Double ("Length", "", DC_Frac, "%", &m_Q.m_dMinFracSectLen, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_Q.m_dMinFracSectLen>0); DDB.Double ("LoadTol", "", DC_Frac, "%", &m_Q.m_dLoadTol, this, isParm); DDB.Double ("TempTol", "", DC_Frac, "%", &m_Q.m_dTempTol, this, isParm); DDB.Double ("MFracTol", "", DC_Frac, "%", &m_Q.m_dMFracTol, this, isParm); } DDB.EndStruct(); DDB.Text(""); BuildDataDefnShowIOs(DDB); if (m_WtMtrPos.GetSize()) { DDB.Page("WtMtrs", DDB_RqdPage); if (DDB.BeginArray(this, "WtMtr", "WtMtr", m_WtMtrPos.GetSize(), 0)) { for (int i=0; i<m_WtMtrPos.GetSize(); i++) if (DDB.BeginElement(this, i)) { DDB.Double("Pos", "", DC_L , "m", xidWtrMtrPos0+i, this, isParm); DDB.Double("Loading", "", DC_MpL, "kg/m", xidWtrMtrLd0+i, this, isResult|0); DDB.Double("Rate", "", DC_Qm, "kg/s", xidWtrMtrRate0+i, this, isResult|0); DDB.Text(""); } } DDB.EndArray(); } int FdLst[MaxIOList], PrLst[MaxIOList]; int nFd=0, nPr=0; for (int i=0; i<NoFlwIOs(); i++) if (IOId_Self(i)==idFeed) FdLst[nFd++]=i; else if (IOId_Self(i)==idProd) PrLst[nPr++]=i; int DoOld=((!DDB.ForFiling() && !DDB.ForSnapShot() && !DDB.ForScenario() && !DDB.ForView()) || (DDB.ForFiling() && DDB.DoingPutData())); Strng Nm; DDB.Page("Feeds", DDB_RqdPage); if (DDB.BeginArray(this, "Fd", "BltCnvFd", nFd, 0)) for (i=0; i<nFd; i++) if (DDB.BeginElement(this, Nd_Rmt(FdLst[i])->FullObjTag())) { DDB.Double ("Pos", "", DC_L , "m", xidFeedPos0+i, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All); DDB.CheckBoxBtn("Limited", "", DC_, "", xidFeedLimited0+i, this, isParm); DDB.Visibility(NM_Dynamic|SM_All|HM_All, m_Q.FeedLimited(i)); DDB.Double ("Capacity", "", DC_Frac, "%", xidFeedCapFrac0+i, this, isParm); DDB.Visibility(); DDB.Double ("Qm", "", DC_Qm , "kg/s", xidFeedQm0+i, this, 0); DDB.Text(""); if (DoOld) { DDB.BeginElement(this, i); DDB.Double("Pos", "", DC_L , "m", xidFeedPos0+i, this, isParm); DDB.Double("Qm", "", DC_Qm , "kg/s", xidFeedQm0+i, this, 0); } } DDB.EndArray(); DDB.Page("Products", DDB_RqdPage); if (DDB.BeginArray(this, "Pr", "BltCnvPr", nPr, 0)) for (i=0; i<nPr; i++) if (DDB.BeginElement(this, Nd_Rmt(PrLst[i])->FullObjTag())) { DDB.Double("Pos", "", DC_L , "m", xidProdPos0+i, this, isParm); DDB.Double("Removal","", DC_Frac , "%", xidProdRemove0+i, this, isParm); DDB.Double("Qm", "", DC_Qm , "kg/s", xidProdQm0+i, this, 0); DDB.Double("Loss", "", DC_Qm , "kg/s", xidProdLoss0+i, this, 0); DDB.Text(""); if (DoOld) { DDB.BeginElement(this, i); //DDB.TagComment(Nd_Rmt(PrLst[i])->FullObjTag()); //DDB.BeginElement(this, Nd_Rmt(PrLst[i])->FullObjTag()); DDB.Double("Pos", "", DC_L , "m", xidProdPos0+i, this, isParm); DDB.Double("Removal","", DC_Frac , "%", xidProdRemove0+i, this, isParm); DDB.Double("Qm", "", DC_Qm , "kg/s", xidProdQm0+i, this, 0); DDB.Double("Loss", "", DC_Qm , "kg/s", xidProdLoss0+i, this, 0); } } DDB.EndArray(); if (m_fShowProfile) DDB.Object(&m_Q.Profile(), this); //BuildDataDefnAreaIOs(DDB); DDB.EndStruct(); };
/*#F:This provides access to the variables of the model and calls the BuildDataDefn for objects Tled by the model.*/ void Flot::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(); GSM.Add_OnOff(DDB); DDB.Visibility(DYNMODE); DDB.Text (""); //DDB.Double ("Datum_Rqd", "Z_Rqd", DC_L , "m", &Z_Rqd, this, isParm|NAN_OK); //DDB.Double ("Datum", "Z", DC_L, "m", &Z, this, 0); DDB.Double ("Pressure", "P", DC_P, "kPag", xidPMean, this, noFile|noSnap); DDB.Double ("Temperature", "T", DC_T, "C", xidTemp, this, noFile|noSnap); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, noFile|noSnap); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, noFile|noSnap); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &QmAcc, this, noFile|noSnap); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &QvAcc, this, noFile|noSnap); DDB.Visibility(); DDB.Text (""); static DDBValueLst DDB1[]={ {(int)True, "SizeRecovery"}, {(int)False, "NoSizeRecovery" }, {0}}; DDB.Bool ("RecoveryMethod", "Method", DC_, "", &RM, this, isParm, DDB1); DDB.Long ("Float", "Flot?", DC_, "", &iFlot, this, isParm, SDB.DDBSolSpList()); if (!RM) { DDB.Double("Recovery", "Recovery", DC_Frac, "%", &Eff, this, isParm); DDB.Double("Grade", "Grade", DC_Frac, "%", &Grd, this, isParm); DDB.Text (""); static DDBValueLst DDB0[]={ {(int)True, "Yes"}, {(int)False, "No" }, {0}}; DDB.Bool ("SecondFloat?", "SecFloat?", DC_, "", &SecFlot, this, isParm, DDB0); if (SecFlot) { DDB.Long ("SecondFloat", "SecFlot", DC_, "", &iSec, this, isParm, SDB.DDBSolSpList()); DDB.Double("SecondGrade", "SecGrade", DC_Frac, "%", &Grade2, this, isParm); } } if (RM) { DDB.Double("TotalRec", "TotalRec", DC_Frac, "%", &TotRecover, this, 0); DDB.Double("Grade", "Grade", DC_Frac, "%", &Grade, this, 0); } DDB.Text(""); DDB.Text (""); //DDB.Double ("SS_Lvl", "", DC_Frac, "%", &SS_Lvl, this, isParm); DDB.Double ("WaterInConc", "FlotWater", DC_Frac, "%", &Rec, this, isParm); DDB.Visibility(DYNMODE); DDB.Byte ("Collect", "Coll?", DC_, "", &iColl, this, isParm, SDB.DDBSpList()); DDB.Visibility(); RB.Add_OnOff(DDB); BuildDataDefnShowIOs(DDB); if (RM) DDB.Object(&SizeRec, this, NULL, NULL, DDB_RqdPage); RB.BuildDataDefn(DDB, NULL, NULL, DDB_RqdPage, 0); GSM.BuildDataDefn(DDB); if (SolveMode()==DYNMODE) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.Visibility(DYNMODE); DDB.Object(&FlotFn, this, NULL, NULL, DDB_RqdPage); DDB.Visibility(); DDB.EndStruct(); };
void CCWasher::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); BuildDataDefnElevation(DDB); DDB.Visibility(); DDB.Text (""); static DDBValueLst DDB0[]={ {(int)MEM_Scandrett, "ScandrettEff"}, {(int)MEM_Mixing, "MixingEff", MDD_Hidden }, //this has bugs, keep hidden! {0}}; static DDBValueLst DDB1[]={ {(int)True, "g/L_Solids"}, {(int)False, "%_Solids" }, {0}}; if (PrjFileVerNo()<49) { DDB.Text ("Requirements"); DDB.CheckBox("On", "", DC_, "", &fOn, this, isParm); DDB.Byte ("Eff_Specie", "RqdSpecie", DC_, "", &iScanEffSpecie, this, isParm, SDB.DDBLiqSpList()); DDB.Double ("Scandrett_wash_eff", "ScandrettEff", DC_Frac, "%", &ScandrettEff, this, isParm); DDB.Bool ("U/FMethod", "SolidSpec", DC_, "", &SA, this, isParm, DDB1); if (SA) DDB.Double("Reqd_UFlowSolids", "R_USol", DC_Conc, "g/L", &RqdUFSolidsConc25, this, isParm); else DDB.Double("U/F_Solids", "U/FSolids", DC_Frac, "%", &RqdUFSolids, this, isParm); DDB.Text ("Results"); DDB.Double ("UnderFlow_Solids", "UFSolids", DC_Frac, "%", &UFSolids, this, isResult|0); DDB.Double ("UnderFlow_Specie", "UFSpecie", DC_Conc, "g/L", &UFCaustic, this, isResult|0); DDB.Double ("OverFlow_Specie", "OFSpecie", DC_Conc, "g/L", &OFCaustic, this, isResult|InitHidden); } else { DDB.Text ("Requirements"); DDB.CheckBox("On", "", DC_, "", &fOn, this, isParm); DDB.Byte ("", "ScanEffSpecie", DC_, "", &iScanEffSpecie, this, isParm, SDB.DDBLiqSpList()); DDB.Byte ("Wash_Eff_Method", "EffMethod", DC_, "", &iEffMethod, this, isParm, DDB0); DDB.Visibility(NSHM_All, iEffMethod==MEM_Mixing); DDB.Double ("Mixing_Efficiency", "MixingEff", DC_Frac, "%", &MixEff, this, isParm); DDB.Visibility(NSHM_All, iEffMethod==MEM_Scandrett); DDB.Double ("Rqd_Scandrett_Wash_Eff", "RqdScandrettEff", DC_Frac, "%", &ScandrettEff, this, isParm); DDB.Visibility(); DDB.Bool ("UnderFlow_Method", "Method", DC_, "", &SA, this, isParm, DDB1); DDB.Visibility(NSHM_All, SA); DDB.Double ("Rqd_U/F_SolidsConc@25", "RqdUFSolConc25", DC_Conc, "g/L", &RqdUFSolidsConc25, this, isParm); DDB.Visibility(NSHM_All, !SA); DDB.Double ("Rqd_UnderFlow_Solids", "RqdUFSolids", DC_Frac, "%", &RqdUFSolids, this, isParm); DDB.Visibility(); DDB.Text (""); DDB.Text ("Results"); DDB.Double ("UnderFlow_Solids", "UFSolids", DC_Frac, "%", &UFSolids, this, isResult|0); //DDB.Double ("OverFlow_Solids", "OFSolids", DC_Frac, "%", &OFSolids, this, isResult|InitHidden); DDB.Double ("UnderFlow_SolidsConc@25", "UFSolConc25", DC_Conc, "g/L", &ActUFSolidsConc25, this, isResult|InitHidden); //DDB.Double ("OverFlow_SolidsConc@25", "OFSolConc25", DC_Conc, "g/L", &ActOFSolidsConc25, this, isResult|InitHidden); DDB.Double ("Scandrett_Wash_Eff", "ScandrettEff", DC_Frac, "%", &ActScandrettEff, this, isResult);//|noFile|noSnap); DDB.Double ("UnderFlow_Specie", "UFSpecie", DC_Conc, "g/L", &UFCaustic, this, isResult|0); DDB.Double ("OverFlow_Specie", "OFSpecie", DC_Conc, "g/L", &OFCaustic, this, isResult|0); DDB.Double ("ByPassGuess", "", DC_, "", &ByPassGuess, this, noView|isParm|NAN_OK); DDB.Double ("WashByPassGuess", "", DC_, "", &WashByPassGuess, this, noView|isParm|NAN_OK); } DDB.Text (""); m_RB.Add_OnOff(DDB); m_EHX.Add_OnOff(DDB); DDB.Text (""); BuildDataDefnShowIOs(DDB); m_RB.BuildDataDefn(DDB); m_EHX.BuildDataDefn(DDB); DDB.Visibility(); if (SolveSurgeMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); } DDB.EndStruct(); }
void FilterPress::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(SM_Buffered|HM_All); BuildDataDefnElevation(DDB); DDB.Visibility(); DDB.Text (""); static DDBValueLst DDB0[]={ {FSM_SolToFiltFrac, "SolidsToFiltrateFraction"}, {FSM_FiltSolConc, "FiltrateConcentration"}, {0}}; DDB.Text ("Requirements"); DDB.Byte ("Filtrate_Method", "Method", DC_, "", &iRqdFiltMethod, this, isParm|AffectsStruct, DDB0); DDB.Visibility(NSHM_All, (iRqdFiltMethod == FSM_SolToFiltFrac)); if (PrjFileVerNo()<48) DDB.Double ("", "RqdFiltSolids", DC_Frac, "%", &RqdSolidsToFiltrate,this, isParm); else DDB.Double ("Rqd_Solids_To_Filtrate", "RqdSolToFilt", DC_Frac, "%", &RqdSolidsToFiltrate,this, isParm);//SolidLoss DDB.Visibility(NSHM_All, (iRqdFiltMethod == FSM_FiltSolConc)); DDB.Double ("Rqd_FiltrateSolidsConc25","RqdFiltSolConc25",DC_Conc, "g/L", &RqdFiltSolConc, this, isParm); DDB.Visibility(); DDB.Double ("Solids_To_FiltrateUsed", "SolToFiltUsed", DC_Frac, "%", &SolidsToFiltUsed, this, isResult|InitHidden);//|noView); DDB.Double ("Rqd_Cake_Moisture", "RqdCakeMoist", DC_Frac, "%", &RqdCakeMoist, this, isParm); DDB.Double ("Rqd_Wash_Efficiency", "RqdWashEff", DC_Frac, "%", &RqdWashEff, this, isParm); DDB.Text ("Results"); DDB.Double ("Wash_Efficiency", "WashEff", DC_Frac, "%", &ActWashEff, this, isResult);//|noFile|noSnap); DDB.Double ("Cake_Solids", "CakeSolids", DC_Frac, "%", &ActCakeSolids, this, isResult);//|noFile|noSnap); DDB.Double ("Filtrate_Solids", "FiltSolids", DC_Frac, "%", &ActFiltSolids, this, isResult);//|noFile|noSnap); DDB.Double ("CakeSolidsConc@25", "CakeSolConc25", DC_Conc, "g/L", &ActCakeSolConc, this, isResult);//|noFile|noSnap); DDB.Double ("FiltrateSolidsConc@25", "FiltSolConc25", DC_Conc, "g/L", &ActFiltSolConc, this, isResult);//|noFile|noSnap); //DDB.Double ("FiltrateSolidsConc@T", "FiltSolConc@T", DC_Conc, "g/L", &ActFiltSolConcT, this, isResult);//|noFile|noSnap|InitHidden); //DDB.Byte ("", "ScanEffSpecie", DC_, "", &iScanEffSpecie, this, isParm, SDB.DDBLiqSpList()); //DDB.Double ("Scandrett_Wash_Eff", "ScandrettEff", DC_Frac, "%", &ActScandrettEff, this, isResult);//|noFile|noSnap); DDB.Byte ("", "WashComp", DC_, "", &iWashEffSpecie, this, isParm, SDB.DDBLiqSpList()); DDB.Double ("", "CompWashEff", DC_Frac, "%", &dSpWashEff, this, isResult);//|noFile|noSnap); DDB.Text (" "); DDB.CheckBox("TrackStatus", "", DC_, "", &bTrackStatus, this, isParm); DDB.Visibility(SM_Buffered|HM_All); DDB.Text (" "); DDB.CheckBoxBtn("", "Filtrate2Washing", DC_, "", &fFilt2Washings, this, isParm, DDBYesNo); DDB.CheckBoxBtn("", "CakeDisch", DC_, "", &fDischarge, this, isParm, DDBYesNo); DDB.Text (" "); DDB.Double ("", "Press_Drop", DC_DP, "kPa", &FilterDP, this, isResult|0); DDB.Double ("", "MembraneRes", DC_MembDP, "kPa.s/m", &MembDP, this, isParm); DDB.Double ("", "Viscosity", DC_Visc, "cP", &LiqVisc, this, isParm); DDB.Double ("", "SpecCakeResistance", DC_SpCakeRes, "m/kg", &SpCakeRes, this, isParm); DDB.Double ("", "Area", DC_Area, "m^2", &FiltArea, this, isParm); if (SolveSurgeMethod()) DDB.Object(&m_Cake, this, NULL, NULL, DDB_RqdPage); DDB.Visibility(); DDB.Text (""); BuildDataDefnShowIOs(DDB); //BuildDataDefnAreaIOs(DDB); DDB.EndStruct(); }
void CoolingTower::BuildDataDefn(DataDefnBlk & DDB) { DDB.BeginStruct(this); DDB.Visibility(NM_Dynamic|SM_All|HM_All); BuildDataDefnElevation(DDB); DDB.Double ("Pressure", "P", DC_P, "kPag", xidPMean, this, isResult|0); DDB.Double ("Temperature", "T", DC_T, "C", xidTemp, this, isResult|0); DDB.Double ("Density", "Rho", DC_Rho, "kg/m^3", xidRho, this, isResult|0); DDB.Double ("Level", "Lvl", DC_Frac, "%", xidLevel, this, isResult|0); DDB.Double ("Mass_Accum", "QmAcc", DC_Qm, "kg/s", &m_QmAcc, this, isResult|0); DDB.Double ("Vol_Accum", "QvAcc", DC_Qv, "L/s", &m_QvAcc, this, isResult|0); AddMdlNetworked(DDB); DDB.Visibility(NM_Probal|SM_All|HM_All); static DDBValueLst DDB0[]={ {CTM_Simple, "Simple"}, {CTM_Merkel, "Merkel"}, {0}}; static DDBValueLst DDB1[]={ {MCT_KaVL, "KaV/L"}, {MCT_TOut, "OutletT"}, {0}}; static DDBValueLst DDB2[]={ {WLM_None, "None"}, {WLM_Frac, "MassFrac"}, {WLM_Qm, "MassFlow"}, {WLM_DriftBlowdown, "Drift&Blowdown"}, {0}}; //TODO: many of these variables should be calculated using xid_xxx rather than storing everything! DDB.Text (""); DDB.Byte ("Method", "", DC_, "", &iMethod, this, isParm|SetOnChange, DDB0); DDB.Text (""); DDB.Text ("Characteristics"); DDB.Visibility(NM_Probal|SM_All|HM_All, iMethod==CTM_Merkel); DDB.Byte ("CalcType", "", DC_, "", &iMerkelCalcType,this, isParm|SetOnChange, DDB1); DDB.Visibility(NM_Probal|SM_All|HM_All); DDB.Double ("AirWetBulbT", "", DC_T, "C", &dAirWetBulbT, this, isParm); DDB.Double ("ApproachTemp","ApproachT", DC_dT, "C", &dApproachT, this, (iMethod==CTM_Merkel && iMerkelCalcType==MCT_TOut) ? isResult : isParm); DDB.Visibility(NM_Probal|SM_All|HM_All, iMethod==CTM_Merkel); DDB.Double ("LG_Ratio", "", DC_, "", &dLGRatio, this, isParm); DDB.Double ("KaVL", "", DC_, "", &dKaVL, this, (iMethod==CTM_Merkel && iMerkelCalcType==MCT_TOut) ? isParm : isResult); DDB.Visibility(NM_Probal|SM_All|HM_All); DDB.Double ("FeedQm", "", DC_Qm, "kg/s", &dQmIn, this, isResult); DDB.Double ("TempFeed", "Feed.T", DC_T, "C", &dTempKFeed, this, isResult); DDB.Double ("TempDrop", "TDrop", DC_dT, "C", &dTempDrop, this, isResult); DDB.Double ("FinalT", "", DC_T, "C", &dFinalT, this, isResult); //DDB.Double ("HeatFlow", "", DC_Pwr, "kW", &dHeatFlow, this, isResult); perhaps remove??? DDB.Visibility(NM_Probal|SM_All|HM_All, iMethod==CTM_Merkel); DDB.Double ("HeatTransfer", "", DC_Pwr, "kW", &dDuty, this, isResult); DDB.Visibility(NM_Probal|SM_All|HM_All); DDB.Double ("FinalP", "", DC_P, "kPag", &dFinalP, this, isResult|InitHidden); DDB.Text (""); DDB.Text ("Water Loss/Makeup"); DDB.Byte ("LossMethod", "", DC_, "", &iLossMethod, this, isParm|SetOnChange, DDB2); DDB.Visibility(NM_Probal|SM_All|HM_All, iLossMethod==WLM_DriftBlowdown); DDB.Double ("DriftLoss", "", DC_Frac, "%", &dDriftLossFrac, this, isParm); DDB.Long ("Cycles", "", DC_, "", &iCycles, this, isParm); DDB.Visibility(NM_Probal|SM_All|HM_All, iLossMethod==WLM_Frac); DDB.Double ("RqdLossFrac", "", DC_Frac, "%", &dRqdLossFrac, this, isParm); DDB.Visibility(NM_Probal|SM_All|HM_All, iLossMethod==WLM_Qm); DDB.Double ("RqdLossQm", "", DC_Qm, "kg/s", &dRqdLossQm, this, isParm); DDB.Visibility(NM_Probal|SM_All|HM_All, iLossMethod==WLM_Frac || iLossMethod==WLM_Qm); DDB.Double ("FracOfLossToDrift", "", DC_Frac, "%", &dRqdDriftLossFrac, this, isParm); DDB.Visibility(NM_Probal|SM_All|HM_All, iMethod==CTM_Merkel); DDB.Double ("EvapFactor", "", DC_, "", &dEvapFactor, this, isParm); DDB.Visibility(NM_Probal|SM_All|HM_All, iMethod==CTM_Simple); DDB.Double ("MaxEvapFrac", "", DC_Frac, "%", &dMaxEvapFrac, this, isParm); DDB.Visibility(NM_Probal|SM_All|HM_All); DDB.Double ("DriftLossQm", "", DC_Qm, "kg/s", &dDriftLossQm, this, isResult); DDB.Double ("BlowdownLossQm", "", DC_Qm, "kg/s", &dBlowdownLossQm,this, isResult); DDB.Double ("LossQm", "", DC_Qm, "kg/s", &dLossQm, this, isResult); DDB.Double ("EvapLossQm", "", DC_Qm, "kg/s", &dEvapLossQm, this, isResult); DDB.Double ("TotalLossQm", "", DC_Qm, "kg/s", &dTotalLossQm, this, isResult|InitHidden); DDB.Double ("WaterEvapQm", "EvapQm", DC_Qm, "kg/s", &dQmWaterEvap, this, isResult|InitHidden); DDB.Double ("WaterVapFrac", "", DC_Frac, "%", &dEvapFrac, this, isResult); if (iMethod==CTM_Merkel) { DDB.Text (""); DDB.Text ("Air-Water Mixture Estimates"); } DDB.Visibility(NM_Probal|SM_All|HM_All, iMethod==CTM_Merkel); DDB.Double ("AirEnthOut", "", DC_HMs, "kJ/kg", &dAirEnthOut, this, isResult); DDB.Double ("HeatAvailable", "", DC_Pwr, "kW", &dDuty, this, isResult); DDB.Double ("AirQm", "", DC_Qm, "kg/s", &dAirQmIn, this, isResult); DDB.Double ("AirCp", "", DC_CpMs, "kJ/kg.C",&dAirCp, this, isParm); DDB.Double ("AirInDryBulbT", "", DC_T, "C", &dAirDryBulbT, this, isParm); DDB.Double ("AirTRise", "", DC_dT, "C", &dAirTRise, this, isResult); DDB.Double ("AirOutT", "", DC_T, "C", &dAirTOut, this, isResult); DDB.Double ("AirWaterMixQm", "", DC_Qm, "kg/s", &dAirMixQm, this, isResult); DDB.Double ("AirWaterMixCpEst", "", DC_CpMs, "kJ/kg.C",&dAirMixCp, this, isResult); DDB.Double ("AirWaterMixTEst", "", DC_T, "C", &dAirMixT, this, isResult); //DDB.Visibility(NM_Probal|SM_All|HM_All); //RB.Add_OnOff(DDB, False); //EHX.Add_OnOff(DDB, False); DDB.Visibility(); DDB.Text (" "); BuildDataDefnShowIOs(DDB); BuildDataDefnIOOpts(DDB); //RB.BuildDataDefn(DDB); //EHX.BuildDataDefn(DDB); //VLE.BuildDataDefn(DDB); if (NetDynamicMethod()) { DDB.Object(&Contents, this, NULL, NULL, DDB_RqdPage); DDB.Object(&m_PresetImg, this, NULL, NULL, DDB_RqdPage); //if (Contents.SpillExists()) // DDB.Object(&Contents.OverFlow(), this, NULL, NULL, DDB_RqdPage); } DDB.EndStruct(); }