CenterForTheBuiltEnvironment / pythermalcomfort

Package to calculate several thermal comfort indices (e.g. PMV, PPD, SET, adaptive) and convert physical variables.
https://pythermalcomfort.readthedocs.io/en/latest/
MIT License
147 stars 52 forks source link

solar gain differences in Py and R. #136

Closed TwinGan closed 3 weeks ago

TwinGan commented 1 month ago
  1. variable fp_table definitions not the same

The value of fp_table in Py

The value of tp_table in R

  1. The formula for e_direct is not same

R: e_direct <- fp solTrans fBes * solRadDir Python: e_direct = f_eff fp sol_transmittance f_bes sol_radiation_dir

There is an f_eff in Python code

@FedericoTartarini and @marcelschweiker to review

marcelschweiker commented 1 month ago

The code for calcSolarGain was provided by a previous student based on pythermalcomfort package. Potentially there have been updates in py since first implementation in R and I trust that the py-version is correct. Therefore, adjustments can be made in R-code to align with py. @FedericoTartarini : we may need to define a way to inform the other package whenever updates are done.

FedericoTartarini commented 1 month ago

@marcelschweiker yes, I agree, from now moving forward we should define a standardised way to communicate changes in the codebase. I think we can use GitHub and tag each other when we make changes, like you did in the athb. Now that we have the shared validation tables, making a change will also trigger an error, consequently, even if we fail to communicate well this will at least point out that the code is different.

@TwinGan please change the R codebase and then once the pull request has been approved by Marcel please close this issue.