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

save E+ output as IDF #442

Open
dataman-py opened this issue Jul 11, 2024 · 10 comments
Open

save E+ output as IDF #442

dataman-py opened this issue Jul 11, 2024 · 10 comments

Comments

@dataman-py
Copy link

Hi

i want to make a dataset from one idf as follow:

1- load idf
2- change some parameters
3- run it
4- give E+ output
5- save changes as new idf

can anyone help me?

@santoshphilip
Copy link
Owner

I think this should be easy with eppy.

1- load idf

import eppy
fname = "/Applications/EnergyPlus-24-1-0/ExampleFiles/Minimal.idf"
wfile = "/Applications/EnergyPlus-24-1-0/WeatherData/USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
idf = eppy.openidf(fname, epw=wfile)

2- change some parameters

see tutorial
https://eppy.readthedocs.io/en/master/Main_Tutorial.html on how to change parameters

3- run it

see this page on running it https://eppy.readthedocs.io/en/master/runningeplus.html#Make-idf.run()-work-like-EPLaunch

4- give E+ output

Read the E+ output https://eppy.readthedocs.io/en/master/Outputs_Tutorial.html

5- save changes as new idf

idf.save(newfilename)

@santoshphilip
Copy link
Owner

I am not sure what you mean by

4- give E+ output

@dataman-py
Copy link
Author

thanks

E+ output is in .htm formart
can I save it as idf like step 5 ( idf.save(new.htm)) ????

@santoshphilip
Copy link
Owner

You cannot save the htm as idf.
You can read data from the htm and use that data to make changes to the idf.

@dataman-py
Copy link
Author

thanks

how can i check the changes?

@dataman-py
Copy link
Author

i want to save new value generated by E+ as idf file

@santoshphilip
Copy link
Owner

Can you give an example.
I am not fully understanding what you are attempting

@dataman-py
Copy link
Author

dataman-py commented Jul 13, 2024

@santoshphilip
yes

for example
in an idf people are 10 and we change it to 15 and run E+
based on these changes other parameters after running will change

I want to save these changes in a new idf

@santoshphilip
Copy link
Owner

What you are describing would work something like this:

peoples = idf.idfobjects['peoples']
people = peoples[0] # grab the 1st peeople in the list

print(people)

PEOPLE,
    Some People,              !- Name
    ,                         !- Zone or ZoneList or Space or SpaceList Name
    ,                         !- Number of People Schedule Name
    People,                   !- Number of People Calculation Method
    10,                       !- Number of People
    ,                         !- People per Floor Area
    ,                         !- Floor Area per Person
    <snip - start>
    <removed some data here>
    <snip - end>
    ,                         !- Ankle Level Air Velocity Schedule Name
    15.56,                    !- Cold Stress Temperature Threshold
    30;                       !- Heat Stress Temperature Threshold


people.Number_of_People = 15

print(people )

PEOPLE,
    Some People,              !- Name
    ,                         !- Zone or ZoneList or Space or SpaceList Name
    ,                         !- Number of People Schedule Name
    People,                   !- Number of People Calculation Method
    15,                       !- Number of People
    ,                         !- People per Floor Area
    ,                         !- Floor Area per Person
    <snip - start>
    <removed some data here>
    <snip - end>
    ,                         !- Ankle Level Air Velocity Schedule Name
    15.56,                    !- Cold Stress Temperature Threshold
    30;                       !- Heat Stress Temperature Threshold

idf.saveas("newfile.idf")

Note that we are not using the htm file in this process. Your example does not ask for data from the htm file

@dataman-py
Copy link
Author

thanks for response

but it is not my solution

no problem

I will try more to solve it

thanks

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

2 participants