Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

Problems with room model

asked 2018-05-14 04:34:31 -0500

Adrian gravatar image

updated 2018-05-17 05:47:05 -0500

I'm working with the room model in a new program, because this model is giving me so many errors. I found another question here about room model (https://unmethours.com/question/29564...). I think my problem is the same that in the other question, but I'm not capable of solve it.

I tried to reinstall OpenModelica and I checked out about the version of the library. I did a lot of changes and I got errors in every single step. I wrote the following code, because see every single error could be impossible.

    model nuevaHab
        replaceable package MediumA = Buildings.Media.Air;
    parameter Integer nConExtWin = 1;
    parameter Integer nConBou=4;
    parameter Integer nSurBou=0;
    parameter Integer nConExt=1;
    parameter Integer nConPar=0;

  Buildings.ThermalZones.Detailed.MixedAir mixedAir1(
  redeclare package Medium=MediumA,
  hRoo=4,
  AFlo=25,
  lat=37.22,
  nConExtWin=nConExtWin,
  nConBou=nConBou,
  nSurBou=nSurBou,
  nConExt=nConExt,
  nConPar=nConPar,
  datConExtWin(layers={Wall1},each A=25, each til=Buildings.Types.Tilt.Wall, each azi=Buildings.Types.Azimuth.S,wWin={2*3},glaSys={glaSys},hWin={2},fFra={0.001}),
  datConBou(layers={Wall3,Floor,Ceiling,Wall4},A={25,25,25,25}, til={Buildings.Types.Tilt.Wall,Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Ceiling,Buildings.Types.Tilt.Wall}),
  datConExt(layers={Wall2},each A=25,each til=Buildings.Types.Tilt.Wall,each azi=Buildings.Types.Azimuth.W))
   annotation(
    Placement(visible = true, transformation(origin = {48, -18}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));


/*parameter Buildings.ThermalZones.Detailed.Constructions.Construction Wall1(
A=25,
til=Buildings.Types.Tilt.Wall,
layers={Buildings.HeatTransfer.Data.OpaqueConstructions.Generic});*/

parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic Wall2(
  final nLay=3,
    material={
      Buildings.HeatTransfer.Data.Solids.Concrete(x=0.2),
      Buildings.HeatTransfer.Data.Solids.InsulationBoard(x=0.15),
      Buildings.HeatTransfer.Data.Solids.Concrete(x=0.05)});

parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic Wall3(
  final nLay=2,
  absIR_a=0.9,
  absIR_b=0.9,
  absSol_a=0.6,
  absSol_b=0.6,
    material={
      Buildings.HeatTransfer.Data.Solids.Generic(x=0.0127,k=0.12,c=1210,d=540),
      Buildings.HeatTransfer.Data.Solids.Generic(x=0.133,k=0.047,c=1006,d=93.84)});

  parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic Wall1(
    nLay=3,
    absIR_a=0.9,
    absIR_b=0.9,
    absSol_a=0.6,
    absSol_b=0.6,
    material={
      Buildings.HeatTransfer.Data.Solids.Generic(x=0.009,k=0.140,c=900,d=530),
      Buildings.HeatTransfer.Data.Solids.Generic(x=0.066,k=0.040,c=840, d=12),
      Buildings.HeatTransfer.Data.Solids.Generic(x=0.012,k=0.160,c=840,d=950)});

parameter  Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys(
    UFra=2,
    shade=Buildings.HeatTransfer.Data.Shades.Gray(),
    haveExteriorShade=false,
    haveInteriorShade=true);

parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic Floor(
    final nLay=4,
    absIR_a=0.9,
    absIR_b=0.9,
    absSol_a=0.6,
    absSol_b=0.6,
    material={
    Buildings.HeatTransfer.Data.Solids.Generic(x=5.28,k=1,c=0,d=0),
    Buildings.HeatTransfer.Data.Solids.Generic(x=0.01905,k=0.15,c=1630,d=608),
    Buildings.HeatTransfer.Data.Solids.Generic(x=0.01905,k=0.12,c=1210,d=540 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-16 18:56:36 -0500

Your model has a couple of errors: First you need to change

parameter Integer nConBou=3;

to

parameter Integer nConBou=4;

as you have 4 constructions.

Next, you need to add inputs for the shading control signal, the internal heat gain and the weather data, as is done in Buildings.ThermalZones.Detailed.Examples.MixedAirFreeResponse

Then the model simulates in Dymola and JModelica.

edit flag offensive delete link more

Comments

Hello!

I edited the code. The model, plus the changes that you told me, is on my first comment. However I'm still getting the same errors. I'm using OMEdit. I tryed to execute the example mixedAirFreeResponse, but other errors appear. Maybe the errors are because I'm using OMEdit?

However I don't understand the error message when I simulate my code. The error says what I wrote in my 1st comment. datConBou is of type Buildings.ThermalZones.Detailed.Constructions.Construction.I created Floor with a different type but I followed the user guide so what am I missing?

Adrian gravatar imageAdrian ( 2018-05-17 05:45:58 -0500 )edit

Not all models translate in OpenModelica, and the MixedAir room model is one of the models that does not translate. Did you try using JModelica or Dymola? With these tools, the model translates and simulates with the changes from my answer above.

Michael Wetter gravatar imageMichael Wetter ( 2018-05-17 19:26:00 -0500 )edit

I'm trying to use JModelica since I read your first comment. However it been a while since I don't use the command prompt, so I'm really lost right now, although I'll try to find some JModelica user's guide or a forum to see how it works. Thanks!

Adrian gravatar imageAdrian ( 2018-05-18 02:11:02 -0500 )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

1 follower

Stats

Asked: 2018-05-14 04:34:31 -0500

Seen: 55 times

Last updated: May 17