[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TRNSYS-users] Angle Optimization in SDHW in TRNSYS - with Genopt



Hello all,

I am trying to optimise the angle of collector for a Solar domestic hot water system (SDHW – example case) with the objective being to the Auxillary heat should be minimised. My idea is to assign the collector slope angle as a variable (“angle”) and optimise it by varying it from 0 to 90 degrees in steps. The file writes the output into Daily.txt, Totals.txt and .pl2 files when you run it. In the current method that I have done, when I use genopt for the totals.txt file, the optimal angle for the whole year (8760 hours) is obtained. How do I approach it so that I can get the optimal angle at every time step (like hours 1 to 2 – angle is 35deg, hours 2 to 3 – angle is 38deg and so on)? Or if there is some method without Genopt, it would be nice to hear about it as well.

 

I use TRNSYS 17 and Genopt 3.0 and have attached the .tpf, .dck (both the input and the template file), .ini, Genopt commands related files as well. I would be grateful if you could help me out with this. Thank you.

 

Best Regards,

Rakesh

 

--

Rakesh Ramesh

Research Scientist,

Urban Energy Systems,

VTT

Mail: P.O. Box 1000, FI-02044 VTT, FINLAND

Email: rakesh.ramesh@vtt.fi

Attachment: GenOptCfg-Trnsys17.1.cfg
Description: GenOptCfg-Trnsys17.1.cfg

Attachment: Genopt.ini
Description: Genopt.ini

Attachment: SDHW.dck
Description: SDHW.dck

Attachment: Template.dck
Description: Template.dck

// GenOpt project command file 
// Kun Zhang, LBNL, 2020-05-30

// Parameters

Vary {

    Parameter { Name = a; Min = 0.0; Ini = 0.0; Max = 90.0; Step = 0.5; Type = CONTINUOUS; }
    
}

// Optimization settings

OptimizationSettings {

    // Maximum number of iterations (GenOpt will return with an error once this number is reached)
	MaxIte = 2000;
    // Maximum number of iterations with the same cost function value
	MaxEqualResults = 5;
	// Write step number to file or not
    WriteStepNumber = false;
	// Maximum number of simulations that can run in parallel (depending on the algorithm). 0 means "up to the number of CPU cores".
	//UnitsOfExecution = 0;
}

// Optimization algorithm

Algorithm{

  // Hybrid Generalized Pattern Search Algorithm with Particle Swarm Optimization Algorithm
  // Hybrid Algorithm for Continuous and Discrete Variables (must contain at least one continuous parameter)
  // Algorithm settings are from an EnergyPlus example provided with GenOpt

  Main = GPSPSOCCHJ;
  NeighborhoodTopology = vonNeumann;
  NeighborhoodSize = 5;
  NumberOfParticle = 10;
  NumberOfGeneration = 10;
  Seed = 1;
  CognitiveAcceleration = 2.8;
  SocialAcceleration = 1.3;
  MaxVelocityGainContinuous = 0.5;
  MaxVelocityDiscrete = 4;
  ConstrictionGain = 0.5;
  MeshSizeDivider = 2;
  InitialMeshSizeExponent = 0;
  MeshSizeExponentIncrement = 1;
  NumberOfStepReduction = 4;

}

Attachment: SDHW.tpf
Description: SDHW.tpf