Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
6

Ground temperature in openstudio

asked 2018-01-04 03:10:54 -0600

Manuel gravatar image

I wanted to change the ground temperature in openstudio. I saw in other posts that default is set at 18 ° C. I tried to follow some other posts, but with poor results, I'm a freshman of openstudio and I'm not able to use energy plus. I tried to copy this post but, despite not reporting errors, it fails to load into the model. this post I do not even know how to basting it. does anyone have the patience to give me a hand? I would be interested in setting the monthly averages of the outdoor air as monthly temperatures of the ground. if a measure were possible in such a way as to use it also in future works it would not be bad. thank you all

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2018-01-04 04:54:30 -0600

Avi gravatar image

After some reading in the Engineering Reference I decided that for my application (Residential) a good solution would be to use the Foundation Kiva, Rather then setting the ground temperature to the average monthly air temperature. The Input Output Reference is stating:

Caution: The “undisturbed” ground temperatures calculated by the weather converter should not be used in building losses but are appropriate to be used in the Site:GroundTemperature:Shallow and Site:GroundTemperature:Deep objects. The reasoning (for building losses) is that these values are too extreme for the soil under a conditioned building. For best results, use the Slab or Basement program described in this document to calculate custom monthly average ground temperatures (see the Ground Heat Transfer section). This is especially important for residential applications and very small buildings. If one of these ground temperature preprocessors is not used, for typical commercial buildings in the USA, a reasonable default value is 2C less than the average indoor space temperature.

You can read about the theory behind Foundation Kiva in the Engineering Reference from page 144 and on. You are welcome to use the E+ Measures I wrote to include Foundation Kiva and for Kiva settings at your own risk.

edit flag offensive delete link more

Comments

the problem is created when I calculate the model without hvac systems. I have a supermarket as a model. 3 walls on 4 against ground, so modeled in winter with external temperature 0 ° C and without heating system, the internal temperature does not drop below 17 ° C. doing so when I insert the hvac system, at night with the thermostat off, the temperature would not drop below 18 ° C.

Manuel gravatar image Manuel  ( 2018-01-05 02:14:14 -0600 )edit

Have you tried running the model with the Kiva measures?

Avi gravatar image Avi  ( 2018-01-05 03:09:34 -0600 )edit

not yet. I have to click on apply measure. create a new one from the template. and make a paste copy of the link code in the .RB file, right?

Manuel gravatar image Manuel  ( 2018-01-05 04:33:42 -0600 )edit

Yes that should work

Avi gravatar image Avi  ( 2018-01-05 04:37:25 -0600 )edit

I can not make it go. gives me errors: [12: 54: 53.930441 ERROR] Could not set argument 'footWallConstName' to value 'concrete'

Manuel gravatar image Manuel  ( 2018-01-05 06:00:32 -0600 )edit
0

answered 2021-01-29 04:32:50 -0600

Iswarya M Mohan gravatar image

updated 2021-01-29 04:33:33 -0600

You could try using the following code, but I have set only a single input variable that will set the temperature for the entire year. Monthly variation has not been provided for. You could create more input variables as per your convenience.

class AddGroundTemperatures < OpenStudio::Measure::ModelMeasure

  #define the name that a user will see
  def name
    return "Add user defined monthly Ground Temperatures"
  end

  # human readable description
  def description
    return 'Set the ground temperature to user-defined values for all months'
  end

  # human readable description of modeling approach
  def modeler_description
    return 'Adds a specific ground temperature overriding the default energyplus ground temperature of 18 degree celsius.'
  end

  #define the arguments that the user will input
  def arguments(model)

    args = OpenStudio::Measure::OSArgumentVector.new

    # Define input variables
    ground_temp = OpenStudio::Measure::OSArgument::makeDoubleArgument('ground_temp',true)
    ground_temp.setDisplayName('Ground Temperature')
    ground_temp.setDefaultValue(18)
    args << ground_temp

    return args
  end #end the arguments method


  #define what happens when the measure is run
  def run(model, runner, user_arguments)
    super(model, runner, user_arguments)

    #use the built-in error checking
    if not runner.validateUserArguments(arguments(model), user_arguments)
      return false
    end

    #set user defined values to variables
    ground_temp = runner.getDoubleArgumentValue('ground_temp',user_arguments)

    # assign the user inputs to variables
    data=[ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp,ground_temp]
    # create ground temperature object    
    groundtemps = OpenStudio::Model::SiteGroundTemperatureBuildingSurface.new(model)
    # add monthly temperatures
    groundtemps.setAllMonthlyTemperatures(data)


    # check the ground temperature for reasonableness
    if ground_temp <=0
      runner.registerError("Please choose a temperature above 0")
      return false
    end


    # report final condition
    runner.registerFinalCondition("The model's ground temperature was changed to #{ground_temp}.")


    return true

  end #end the run method

end #end the measure

#this allows the measure to be used by the application
AddGroundTemperatures.new.registerWithApplication
edit flag offensive delete link more

Comments

You can just do data=[ground_temp]*12 ;-)

shorowit gravatar image shorowit  ( 2021-01-29 15:38:20 -0600 )edit

Yes, just wanted to make my point regarding the flexibility of the code. Thanks for the comment :)

Iswarya M Mohan gravatar image Iswarya M Mohan  ( 2021-01-31 23:02:54 -0600 )edit

Iswarya M Mohan , How can he change de code do get decimal values, for example 15.5?

J Monteiro gravatar image J Monteiro  ( 2021-03-11 07:31:28 -0600 )edit

You need to run the measure using menu item 'Components and Measures' >'Apply Measure Now' in the OpenStudio App. Once you click the measure, enter the required value in the textbox that appears on the right.

Iswarya M Mohan gravatar image Iswarya M Mohan  ( 2021-03-11 07:58:22 -0600 )edit

I try with 16,7 C, but when I run the simulation I get the information that the ground temperature is 16 C

J Monteiro gravatar image J Monteiro  ( 2021-03-11 08:15:16 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

2 followers

Stats

Asked: 2018-01-04 03:10:54 -0600

Seen: 1,300 times

Last updated: Jan 29