Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong call to c1_korr in _calc_inner_elements() #734

Open
PGorzalka opened this issue May 5, 2023 · 3 comments
Open

wrong call to c1_korr in _calc_inner_elements() #734

PGorzalka opened this issue May 5, 2023 · 3 comments

Comments

@PGorzalka
Copy link

PGorzalka commented May 5, 2023

What is the problem?

There seems to be an inconsistency in the _calc_inner_elements() function of OneElement to FourElement. If only one inner element exists, the following code is executed:

        if 0 < len(inner_walls) <= 1:
            # only one outer wall, no need to calculate chain matrix
            self.r1_iw = inner_walls[0].r1
            self.c1_iw = inner_walls[0].c1_korr

This seems to be a copy-paste mistake (note the "only one outer wall"): last line should be self.c1_iw = inner_walls[0].c1
I talked about this today with @DaJansenGit and also had that impression after my first description of the topic.

Why do we want to solve it?

It produces wrongly high capacity values for zones with only one inner element. That happens always if set_inner_wall is called within a building with only one floor, i.e. no ceilings and floors are created.

How do we want to solve it?

  1. Change the line in all four element calculators
  2. (optional) consistently separate c1_korr and c1
    a. remove replacement of c1 by c1_korr in wall.calc_equivalent.res()
        if type(self).__name__ == "OuterWall" \
                or type(self).__name__ == "Rooftop" \
                or type(self).__name__ == "GroundFloor":
            self.c1 = self.c1_korr

b. in _calc_parallel_connection(), replace the unnecessary repetitions of direct calls to .c1 by an initial call to .c1_korr or .c1 depending on which elements the parallel connection is calculated for.

As 2.b is part of my current contribution to issue #679 , I would suggest correcting this small bug afterwards.

@DaJansenGit
Copy link
Member

Thanks, @PGorzalka, for digging this deep into the calculations. I agree that this is a copy-paste mistake as inner walls should be taken into account as only one half of their total capacity and not by using the corrected c1 value. Referring to VDI 6007 I found:

Where temperatures are identical in adjacent rooms, a symmetrical thermal load on the building components can be assumed. The equivalent model as shown in Figure 1 may then be reduced to a model consisting of the elements R1 and C1. Where the thermal load occurs on one side only, the equivalent model for the general case of a thermal load can be simplified as shown in Figure 2.

Figure 1:
image

Figure 2:
image

As we currently only take into account symmetrical thermal loads for inner walls I agree, that only one half of the wall should be used and therefore the line of code needs to be changed to

self.c1_iw = inner_walls[0].c1

@PRemmen: you initially implemented these lines. Do you agree with this?

@mlauster
Copy link
Contributor

mlauster commented May 8, 2023 via email

@PGorzalka
Copy link
Author

Hey @mlauster , of course you're right and I already checked the rest of the chain. I already had an overview of these parts of the code because I used the "raw" r1/2/3 and c1/2 values for a more detailed model of a test building for this publication.
The chain, as I understand it, is

  1. Wall.calc_equivalent_res() calculates Wall.c1, Wall.c2, Wall.c1_korr etc. following VDI 6007-1 equations 12-17. For exterior elements, it assigns the value Wall.c1 = Wall.c1_korr (here line 226).
  2. TwoElement._calc_inner_elements() first calls the elements' calc_equivalent_res() and directly afterwards either (here line 964)
  • calls TwoElement._calc_parallel_connection() where (here line 492) always c1 is accessed. This follows VDI 6007-1 equations 23-24 which use c1 for inner walls and c1_korr for outer walls.
  • or directly uses InnerWall.c1_korr if only one inner element exists, which is, as @DaJansenGit has explained above, pretty sure a typo.

I also had a look into the VDI 6007 examples. All of them have multiple inner elements, so the second case of the direct link to c1_korr is never called in the test cases. It is, however, called by all four ASHRAE verification cases. Changing the above mentioned code line would probably cause a reduction in the thermal mass of the exported models. I have no insight in their results though, so I don't know what the consequences would be. I assume it would still be within the borders shown in Figure 4.18 of your thesis @mlauster. Is there anything else that should be considered in your opinion?
Figure 4.18 compares heat load of a reference day in the TwoElement model to the ASHRAE 140 reference values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants