// Script to generate plot for documentation of
// function HeatTransfer.Channel.kc_evenGapLaminar
// of FluidDissipation Library
//
// Generated by Thorben Vahlenkamp
// 09-10-2008
// last change: 19-03-2009
// XRG Simulation GmbH

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

translateModel("ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.Channel.kc_evenGapLaminar");

Advanced.StoreProtectedVariables:=true;

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

switchToSimulationMode();

removePlots();
createPlot(id = 1,
 position = {(-2), (-21), 708, 403},
 x = "abscissa[1]",
 y = {
    "Nu_1[1]",
    "Nu_1[2]",
    "Nu_1[3]"},
 heading = "Even gap (Target= 1): Developed laminar regime with constant temperature at one side of gap",
 range = {1e0, 2e3, 1e2, 1},
 autoscale = true,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_evenGapLaminar.mat",
 logX = true,
 logY = true,
 legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Dimensionless length (x = [{L/d_hyd}/{Re*Pr}]^0.5) [-]");

createPlot(id = 2,
 position = {(-2), 400, 708, 403},
 x = "abscissa[1]",
 y = {
    "Nu_2[1]",
    "Nu_2[2]",
    "Nu_2[3]"},
 heading = "Even gap (Target= 2): Developed laminar regime with constant temperature at both sides of gap",
 range = {1e0, 2e3, 1e2, 1},
 autoscale = true,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_evenGapLaminar.mat",
 logX = true,
 logY = true,
legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
 leftTitle = "Nusselt number [-]",
bottomTitle = "Dimensionless length (x = [{L/d_hyd}/{Re*Pr}]^0.5) [-]");

createPlot(id = 3,
 position = {708, (-21), 708, 403},
 x = "abscissa[1]",
 y = {
    "Nu_3[1]",
    "Nu_3[2]",
    "Nu_3[3]"},
 heading = "Even gap (Target= 3): Undeveloped laminar regime with constant temperature at one side of gap",
 range = {1e0, 2e3, 1e2, 1},
 autoscale = true,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_evenGapLaminar.mat",
 logX = true,
 logY = true,
 legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
leftTitle = "Nusselt number [-]",
bottomTitle = "Dimensionless length (x = [{L/d_hyd}/{Re*Pr}]^0.5) [-]");

 createPlot(id = 4,
 position = {708, 400, 708, 403},
x = "abscissa[1]",
 y = {
    "Nu_4[1]",
    "Nu_4[2]",
    "Nu_4[3]"},
 heading = "Even gap (Target= 4): Undeveloped laminar regime with constant temperature at both sides of gap",
range = {1e0, 2e3, 1e2, 1},
 autoscale = true,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_evenGapLaminar.mat",
 logX = true,
 logY = true,
 legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
 leftTitle = "Nusselt number [-]",
bottomTitle = "Dimensionless length (x = [{L/d_hyd}/{Re*Pr}]^0.5) [-]");

Modelica.Utilities.System.setWorkDirectory(currentDirectory);
