// Script to generate plot for documentation of
// function HeatTransfer.HeatExchanger.kc_flatTube_KC
// of FluidDissipation Library
//
// Generated by Sven Rutkowski
// 06-01-2010
// last change: 06-01-2010
// XRG Simulation GmbH

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

translateModel("ModelicaTest.Fluid.Dissipation.Verifications.HeatTransfer.HeatExchanger.kc_flatTube_KC");

Advanced.StoreProtectedVariables:=true;

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

switchToSimulationMode();

removePlots();
createPlot(id = 1,
  position = {(-2), (-21), 708, 403},
 x = "Nu",
 y = {
	"Re_1"
},
 heading = "Flat tube and louver fin (inverted): Heat transfer",
 range = {1e0, 1e2, 1e4, 1e1},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_flatTube_KC.mat",
 legends = {
	"Pr= 0.72 (Air)"
},
 leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");

createPlot(id = 2,
  position = {711, (-21), 708, 403},
 x = "Nu",
 y = {
	"Re_2"
},
 heading = "Flat tube and rectangular offset strip fin (inverted): Heat transfer",
 range = {1e0, 1e2, 1e4, 1e1},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_flatTube_KC.mat",
 legends = {
	"Pr= 0.72 (Air)"
},
 leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");


createPlot(id = 3,
  position = {353, 190, 708, 403},
  x = "Nu",
 y = {
	"Re_1",
	"Re_2"},
 heading = "Flat Tube Heat Exchanger (inverted): Heat transfer (Air)",
range = {1e0, 1e2, 1e4, 1e1},
 autoscale = false,
 autoerase = true,
 autoreplot = true,
 description = false,
 grid = true,
 color = true,
 online = false,
 logX = true,
 logY = true,
 filename = "kc_flatTube_KC.mat",
 legends = {
	"Louver fin",
	"Rectangular offset strip fin"
},
 leftTitle = "Reynolds number [-]",
 bottomTitle = "Nusselt number [-]");

Modelica.Utilities.System.setWorkDirectory(currentDirectory);
