// Script to generate plot for documentation of
// function HeatTransfer.StraightPipe.kc_twoPhaseOverall_KC
// of FluidDissipation Library
//
// Generated by Nina Peci
// 03-09-2009
// last change: 03-09-2009
// XRG Simulation GmbH

currentDirectory = Modelica.Utilities.System.getWorkDirectory();
cd(Modelica.Utilities.System.getEnvironmentVariable("temp"));

translateModel("ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.StraightPipe.kc_twoPhaseOverall_KC");

Advanced.StoreProtectedVariables:=true;

simulateModel("ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.StraightPipe.kc_twoPhaseOverall_KC",startTime=0, stopTime=1, numberOfIntervals=5000, method="dassl", tolerance=1e-005, resultFile="kc_twoPhaseOverall_KC");

switchToSimulationMode();

removePlots();

createPlot(id = 1,
 position = {(0), (-20), 550, 320},
 x = "x_flow",
 y = {  "kc_1[1]",
	"kc_1[2]",
	"kc_1[3]"},
 heading = "Straight pipe: Heat transfer for two phase flow (boiling in a horizontal pipe, R134a, T= 4.4 C)",
 range = {0, 1, 0, 8000},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_twoPhaseOverall_KC.mat",
 logX = false,
 logY = false,
 legends = {
	"m=299 kg/m2s",
	"m=199 kg/m2s",
	"m=100 kg/m2s"
	},
 leftTitle = "Heat transfer coefficient [W/m2K]",
 bottomTitle = "Mass flow rate quality [-]");

createPlot(id = 2,
 position = {(0), 330, 550, 320},
 x = "x_flow",
 y = {  "kc_2"},
 heading = "Straight pipe: Heat transfer for two phase flow (boiling in a vertical pipe, R22, t = -15 C)",
 range = {0, 1, 0, 10000},
 autoscale = false,
 autoerase = false,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_twoPhaseOverall_KC.mat",
 logX = false,
 logY = false,
 legends = {
	"m=400 kg/m2s"},
 leftTitle = "Heat transfer coefficient [W/m2K]",
 bottomTitle = "Mass flow rate quality [-]");

createPlot(id = 3,
 position = {560, (-20), 550, 320},
 x = "x_flow",
 y = {  "Nu_3[1]"},
 heading = "Straight pipe: Heat transfer for two phase flow (condensation in a horizontal pipe, R22, t = 35 C)",
 range = {0, 1, 0, 400},
 autoscale = false,
 autoerase = false,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_twoPhaseOverall_KC.mat",
 logX = false,
 logY = false,
 legends = {
	"m=225"},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Mass flow rate quality [-]");


createPlot(id = 4,
 position = {560, 330, 550, 320},
 x = "x_flow",
 y = {  "kc_3[4]",
	"kc_3[5]",
	"kc_3[6]"},
 heading = "Straight pipe: Heat transfer for two phase flow (condensation in a horizontal pipe, R134a, t = 35 C)",
 range = {0, 1, 0, 12000},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_twoPhaseOverall_KC.mat",
 logX = false,
 logY = false,
 legends = {
	"m=650",
	"m=300",
	"m=75"},
 leftTitle = "Heat transfer coefficient [W/m2K]",
 bottomTitle = "Mass flow rate quality [-]");

Modelica.Utilities.System.setWorkDirectory(currentDirectory);
