// Script to generate plot for documentation of
// function HeatTransfer.HelicalPipe.kc_overall
// of FluidDissipation Library
//
// Generated by Thorben Vahlenkamp
// 08-12-2008
// last change: 26-06-2009
// XRG Simulation GmbH

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

translateModel("ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.HelicalPipe.kc_overall");

Advanced.StoreProtectedVariables:=true;

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

switchToSimulationMode();

removePlots();
createPlot(id = 1,
  position = {(-2), (-21), 708, 403},
 x = "Re",
 y = {
	"Nu_1[1]",
	"Nu_1[2]",
	"Nu_1[3]"},
 heading = "Helical pipe: Heat transfer for overall regime (n_nt=1.9, d_hyd/L=0.002, h= 0.03m)",
 range = {1e1, 1e5, 1e3, 3e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_overall.mat",
 legends = {
	"Pr= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"
},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Reynolds number [-]");

createPlot(id = 2,
  position = {711, (-21), 708, 403},
  x = "Re",
 y = {
	"Nu_2[1]",
	"Nu_2[2]",
	"Nu_2[3]"},
 heading = "Helical pipe: Heat transfer for overall regime (n_nt=7.8, d_hyd/L=0.002, h= 0.03m)",
 range = {1e1, 1e5, 1e3, 3e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_overall.mat",
 legends = {
	"Pr= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"
},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Reynolds number [-]");

createPlot(id = 3,
  position = {(-4), 400, 708, 406},
  x = "Re",
 y = {
	"Nu_3[1]",
	"Nu_3[2]",
	"Nu_3[3]"},
 heading = "Helical pipe: Heat transfer for overall regime (n_nt= 15.8, d_hyd/L=0.002, h= 0.03m)",
 range = {1e1, 1e5, 1e3, 3e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_overall.mat",
 legends = {
	"Pr= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"
},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Reynolds number [-]");

createPlot(id = 4,
  position = {708, 400, 708, 403},
  x = "Re",
 y = {
	"Nu_1[2]",
	"Nu_2[2]",
	"Nu_3[2]"},
 heading = "Helical pipe: Heat transfer for overall regime (Water, d_hyd/L=0.002, h= 0.03m)",
range = {1e1, 1e5, 1e3, 3e0},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_overall.mat",
 legends = {
	"number of turns n_nt = 1.9",
	"n_nt = 7.8",
	"n_nt = 15.8"
},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Reynolds number [-]");

createPlot(id = 5,
   position = {375, 177, 708, 412},
 y = {
	"n_nt[1]",
	"n_nt[2]",
	"n_nt[3]",
	"frac_dtoL",
	"frac_dhydTodcoil[1]",
	"frac_dhydTodcoil[2]",
	"frac_dhydTodcoil[3]"
},
 heading = "Check",
 range = {0, 0.1, 5e5, 0},
 autoscale = true,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
  filename = "kc_overall.mat",
 leftTitle = "yyy",
 bottomTitle = "xxx");

Modelica.Utilities.System.setWorkDirectory(currentDirectory);
