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

Revision history [back]

Your Eppy code needs to run before the jEPlus code. One way to achieve what you want would be to use EPMacro code, which can be inserted by Eppy.

Extending on the code from your snippet:

...
## SET1 Layout @@layout@@
## SET1 Floor @@floor@@

for wall in walls:
    if wall.Name in ext_walls_windowless:
        ## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]
        wall.Outside_Boundary_Condition = 'Adiabatic'
        wall.Sun_Exposure = 'NoSun'
        wall.Wind_Exposure = 'NoWind'
        ## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]]
        wall.Outside_Boundary_Condition =  'Outside'
        wall.Sun_Exposure = 'SunExposed'
        wall.Wind_Exposure = 'WindExposed'
        ## ENDIF

You'll need to set up the IF conditions as you need them to be, but something like this has worked for me in the past when trying to combine jEPlus and Eppy.

Your Eppy code needs to run before the jEPlus code. One way to achieve what you want would be to use EPMacro code, which can be inserted by Eppy.

Extending on the code from your snippet:snippet (untested):

...
## SET1 Layout @@layout@@
## SET1 Floor @@floor@@

for wall in walls:
    if wall.Name in ext_walls_windowless:
        ## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]
        wall.Outside_Boundary_Condition = 'Adiabatic'
"## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nAdiabatic,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nOutside,\r\n \r\n##ENDIF"
            wall.Sun_Exposure = 'NoSun'
"## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nNoSun,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nSunExposed,\r\n \r\n##ENDIF"
            wall.Wind_Exposure = 'NoWind'
        ## "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nNoWind,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]]
        wall.Outside_Boundary_Condition =  'Outside'
        wall.Sun_Exposure = 'SunExposed'
        wall.Wind_Exposure = 'WindExposed'
        ## ENDIF
FALSE]] \r\nWindExposed,\r\n \r\n##ENDIF"

You'll need to set up As I say, this is untested but I think it should work, at the IF conditions as you need them to be, but something like expense of being quite unreadable. I think there's scope for some kind of extension to Eppy here to generate EPMacro code.

I wouldn't be surprised if @ivan_korolija or @yi_zhang have worked out a better way of doing this has worked for me in the past when trying to combine jEPlus and Eppy.

though.

Your Eppy code needs to run before the jEPlus code. One way to achieve what you want would be to use EPMacro code, which can be inserted by Eppy.

Extending on the code from your snippet (untested):

for wall in walls:
    if wall.Name in ext_walls_windowless:
         wall.Outside_Boundary_Condition = "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nAdiabatic,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nOutside,\r\n \r\n##ENDIF"
         wall.Sun_Exposure = "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nNoSun,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nSunExposed,\r\n \r\n##ENDIF"
         wall.Wind_Exposure = "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nNoWind,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nWindExposed,\r\n \r\n##ENDIF"

As I say, this is untested but I think it should work, at the expense of being quite unreadable. I think there's scope for some kind of extension to Eppy here to generate EPMacro code.

I wouldn't be surprised if @ivan_korolija or @yi_zhang have worked out a better way of doing this though.

Your Eppy code needs to run before the jEPlus code. One way to achieve what you want would be to use EPMacro code, which can be inserted by Eppy.

Extending on the code from your snippet (untested):

for wall in walls:
    if wall.Name in ext_walls_windowless:
        wall.Outside_Boundary_Condition = "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nAdiabatic,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nOutside,\r\n \r\n##ENDIF"
        wall.Sun_Exposure = "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nNoSun,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nSunExposed,\r\n \r\n##ENDIF"
        wall.Wind_Exposure = "## IF EVAL[#[Layout[] EQS TRUE] AND #[Floor[] EQS TRUE]]\r\nNoWind,\r\n## ELIF EVAL[#[Layout[] EQS FALSE] AND #[Floor[] EQS FALSE]] \r\nWindExposed,\r\n \r\n##ENDIF"

As I say, this is untested but I think it should work, at the expense of being quite unreadable. I think there's scope for some kind of extension to Eppy here to generate EPMacro code.

I wouldn't be surprised if @ivan_korolija or @yi_zhang Ivan Korolija orYi Zhang have worked out a better way of doing this though.