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

Ramesh Rakesh Rakesh.Ramesh at vtt.fi
Mon May 9 03:46:00 PDT 2022


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 at vtt.fi<mailto:rakesh.ramesh at vtt.fi>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220509/71142921/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GenOptCfg-Trnsys17.1.cfg
Type: application/octet-stream
Size: 1539 bytes
Desc: GenOptCfg-Trnsys17.1.cfg
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220509/71142921/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Genopt.ini
Type: application/octet-stream
Size: 2615 bytes
Desc: Genopt.ini
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220509/71142921/attachment-0011.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDHW.dck
Type: application/octet-stream
Size: 16794 bytes
Desc: SDHW.dck
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220509/71142921/attachment-0012.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Template.dck
Type: application/octet-stream
Size: 16794 bytes
Desc: Template.dck
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220509/71142921/attachment-0013.obj>
-------------- next part --------------
// 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;

}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SDHW.tpf
Type: application/octet-stream
Size: 262379 bytes
Desc: SDHW.tpf
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20220509/71142921/attachment-0014.obj>


More information about the TRNSYS-users mailing list