// Script to generate plot for documentation of
// function HeatTransfer.StraightPipe.kc_laminar_KC
// of FluidDissipation Library
//
// Generated by Thorben Vahlenkamp
// 20-02-2009
// last change: 24-03-2009
// XRG Simulation GmbH

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

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

Advanced.StoreProtectedVariables:=true;

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

switchToSimulationMode();

removePlots();
//heatTransferTarget=1
createPlot(id = 1,
 position = {(-2), (-21), 708, 403},
 x = "Nu[1]",
 y = {
	"Re_1[1]",
	"Re_1[2]",
	"Re_1[3]"},
 heading = "Straight pipe (heatTransferBoundary=1,inverted): Heat transfer for laminar regime (d_hyd/ L = 0.1)",
  range = {5e0, 1e2, 5e3, 1e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_laminar_KC.mat",
 legends = {
	"Pr= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"
},
 leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");

//heatTransferTarget=2
createPlot(id = 2,
position = {711, (-21), 708, 403},
 x = "Nu[1]",
 y = {
	"Re_2[1]",
	"Re_2[2]",
	"Re_2[3]"},
 heading = "Straight pipe (heatTransferBoundary=2,inverted): Heat transfer for laminar regime (d_hyd/ L = 0.1)",
  range = {5e0, 1e2, 5e3, 1e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
filename = "kc_laminar_KC.mat",
 legends = {
	"Pr= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"
},
  leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");

//heatTransferTarget=3
createPlot(id = 3,
position = {(-4), 400, 708, 406},
 x = "input_Nu.y",
 y = {
    "Re_3[1]",
    "Re_3[2]",
    "Re_3[3]"},
 heading = "Straight pipe (heatTransferBoundary=3,inverted): Heat transfer for laminar regime (d_hyd/ L = 0.1)",
  range = {5e0, 1e2, 5e3, 1e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
filename = "kc_laminar_KC.mat",
 logX = true,
 logY = true,
 legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");

//heatTransferTarget=4
 createPlot(id = 4,
 position = {708, 400, 708, 403},
x = "input_Nu.y",
 y = {
    "Re_4[1]",
    "Re_4[2]",
    "Re_4[3]"},
 heading = "Straight pipe (heatTransferBoundary=4,inverted): Heat transfer for laminar regime (d_hyd/ L = 0.1)",
  range = {5e0, 1e2, 5e3, 1e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
filename = "kc_laminar_KC.mat",
 logX = true,
 logY = true,
legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");

Modelica.Utilities.System.setWorkDirectory(currentDirectory);

