Welcome to the TRNSYS Users Forum.

The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.

Some tips for success on using the forum:

  • Follow the Forum Rules posted in Forum Administration.
  • There are categories for different types of topics and questions. Post your topic or question into the proper category.
  • Before posting a topic or question search the existing topics  (and the TRNSYS Users listserv archive or Post archive) to see if a similar topic or question has already been answered.
  • Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
  • State the version of TRNSYS and which add-ons your are using.
  • Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
  • Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
  • Moderators may edit your post for clarity or move your topic to a more appropriate category.

Notifications
Clear all

Adaptive ASHRAE comfort model implementation for heating room temperature control

3 Posts
2 Users
0 Reactions
125 Views
0
Topic starter

Good morning,

I am a new user of TRNSYS (version 18) and I want to introduce as room temperature control for the heating system the formula of the inner limit of the comfort band of the adaptive model of the ASHRAE 55: 0.31 x PMOT + 15.3 ºC. The specific problem is therefore to implement the PMOT, which would be the average temperature of the week prior to the study. The specific problem is therefore to implement the PMOT, which would be the average outdoor temperature of the week prior to the study week. How could I set up an equation in Simulation Studio that sequentially calculates the average outdoor temperature of the previous week with respect to the calculation time?
Thank you very much in advance for your help!

2 Answers
0

@jll I can think of a couple ways to interpret "previous week" and the answer to your question depends a little on the definition.

If the "previous week" means a running average of one week leading up to the present timestep then you can use Type939 (running totals and averages) in the TESS Utility library.

If "previous week" means that for one simulation week your adaptive comfort model depends on the average from one week before and the whole thing updates only at the start of a new simulation week then it is a little more complicated. What I have done in this case is to use Type55 (to get the average for each week) and then to define a forcing function (Type14) that has a value of 1 for one timestep at the start of the week long period and a value of 0 the rest of the period. That very brief "1" can be used in an equation that updates the value of Type55.

kind regards,

 David

    

JLL Topic starter 04/02/2025 10:44 am

Thank you very much @davidbradley for your answer! Correct, ‘previous week’ means the average of one week before the current week. I have searched in my version of TRNSYS and the most similar type to the one you are talking about is type 84.
The problem is that the maximum number of timesteps is 100. However, the error message indicates that this limit can be increased by modifying the NTmax variable and recompiling the Type.

I’m not sure how to do that. In the parameter tab, I don’t see the NTmax variable.

I took the Type file, opened it with Notepad, and changed the highlighted selection from 100 (the initial timestep limit) to 2500, since I need it to read one previous week with a 5-minute timestep, which equals 2016 timesteps.

I reloaded the file with this modification, but I still get the same error. I’m not sure if it’s because I need to compile the Type, but I don’t really know where that would be done.

I also tried clicking "Edit," and here I can see NTmax, but after changing it, it still doesn’t work.

Thank you again for any help you can give me!

Kind regards,

JLL

0

@jll there might be a couple changes that you need to make. One is that modifying the source code doesn't change the compiled version of the source. You'd need to recompile the TRNDll with the modified source code in order for your change to take effect. That is certainly something you can do but getting it set up might be a lot of trouble for a small change. If you send two pieces of information to techsupport@tess-inc.com we can compile a new TRNDll for you with an increased limit. The info we need is your user id number and the Trnsys version you're using. The user id number can be found by opening the file userXX.id using a text editor. Just copy and paste the contents into an email. The Trnsys version can be found by opening the file trnsys.ini with a text editor. Both files are in your .\TrnsysXX\ directory.

The other change you might need to make is in the Type84 proforma. Double click the proforma from the direct access tool (not the instance that is in your Trnsys project!). Change to the "variables" tab and click the "variables (parameter/inputs/outputs/derivatives)" button. Change to the "parameters" tab and change the max limit on the number of timesteps from whatever it is to "+Inf." As a side note, in my version (18.06.0002) the limit on the number of timesteps is already +Inf so I think this is a change that we've already made. There is a limit on the number of inputs that the Type can deal with but that is the number of averages that you want to compute, not the number of timesteps over which you want to calculate the average.

Once you have changed the max in the proforma and saved the change then you need to go back to the instance in your project, right click on it and select "replace" from the context menu. Browse to find the proforma you modified and select it. The change that you make in a proforma does not get automatically reflected in a project until you "replace" the old proforma version with the new one.

kind regards,

 David

 

Share: