// Script to generate plot for documentation of
// function HeatTransfer.General.kc_approxForcedConvection
// of FluidDissipation Library
//
// Generated by Thorben Vahlenkamp
// 31-08-2009
// last change: 31-08-2009
// XRG Simulation GmbH

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

translateModel("ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.General.kc_approxForcedConvection");

Advanced.StoreProtectedVariables:=true;

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

switchToSimulationMode();

removePlots();
createPlot(id = 1,
 position = {(-2), (-21), 708, 403},
 x = "Re_1[1]",
 y = {
    "Nu_1[1]",
    "Nu_1[2]",
    "Nu_1[3]"},
 heading = "Generic (Dittus/Boelter) (Target= 1): Heat transfer for forced convection",
 range = {1e4, 1e6, 1e1, 1e4},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_approxForcedConvection.mat",
 logX = true,
 logY = true,
 legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
 leftTitle = "Nusselt number [-]",
 bottomTitle = "Reynolds number [-]");

createPlot(id = 2,
 position = {(-2), 400, 708, 403},
 x = "Re_1[2]",
 y = {
    "Nu_2[1]",
    "Nu_2[2]",
    "Nu_2[3]"},
heading = "Generic (Sieder/Tate) (Target= 2): Heat transfer for forced convection",
 range = {1e4, 1e6, 1e1, 1e4},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_approxForcedConvection.mat",
logX = true,
 logY = true,
legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
 leftTitle = "Nusselt number [-]",
bottomTitle = "Reynolds number [-]");

createPlot(id = 3,
 position = {708, (-21), 708, 403},
 x = "Re_1[3]",
 y = {
    "Nu_3[1]",
    "Nu_3[2]",
    "Nu_3[3]"},
 heading = "Generic (Gnielinski) (Target= 3): Heat transfer for forced convection",
 range = {1e4, 1e6, 1e1, 1e4},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 filename = "kc_approxForcedConvection.mat",
logX = true,
 logY = true,
 legends = {
	"Prandtl number= 0.72 (Air)",
	"Pr= 7 (Water)",
	"Pr= 1000 (Antifreeze)"},
leftTitle = "Nusselt number [-]",
bottomTitle = "Reynolds number [-]");

Modelica.Utilities.System.setWorkDirectory(currentDirectory);
