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

Ported SolarCollectors from Buildings library #1884

Merged
merged 3 commits into from
May 21, 2024

Conversation

mwetter
Copy link
Contributor

@mwetter mwetter commented May 15, 2024

This closes #1883. The models were merged with

#!/bin/bash
IBP_HOME="xxx/modelica-ibpsa"


# Get list of files to merge
#files=`git diff --name-only origin/master`
files=`find . -type f -name '*' | grep SolarCollectors | grep -v Obsolete`

for ff in ${files}; do
   fil_ibs=`echo ${ff/Buildings/IBPSA}`
   fil_ibs=`echo ${fil_ibs/Buildings_/IBPSA_}`
   ful_ibs="${IBP_HOME}/${fil_ibs}"
   #echo "Test 1 ${ff}"
   if [ "$fil_ibs" != "IBPSA/package.mo" ] && 
      [ -f ${ff} ] &&
      [ "`echo ${ful_ibs} | grep -c compareVars`" == "0" ] &&
      [ "`echo ${ful_ibs} | grep -c funnel_comp`" == "0" ]; then
     # Create directory if it does not exist
     dirNam=`dirname ${ful_ibs}`
     if [ ! -d ${dirNam} ]; then
       mkdir -p ${dirNam}
     fi
     # Replace text and create file
     sed -e 's|Buildings\.|IBPSA\.|g' ${ff} > out.txt
     sed -e 's|IBPSA.HeatTransfer|Modelica.Thermal.HeatTransfer|g' out.txt > out2.txt
     mv out2.txt out.txt
     sed -e 's|Buildings/Resources|IBPSA/Resources|g' out.txt > ${ful_ibs}
     #echo "Test 2 ${ful_ibs}"

   fi

done

Merging them back to Buildings does not cause file changes (other the Buildings/.copiedFiles.txt)

@mwetter mwetter requested a review from jelgerjansen May 15, 2024 21:08
Copy link
Contributor

@jelgerjansen jelgerjansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwetter I found two models that referred to models in the Buildings library that don't appear in the IBPSA library. I think that all these models can be replaced by a similar (sometimes identical) model in the MSL. I'll already push the changes to this branch.

IBPSA/Fluid/SolarCollectors/Controls/CollectorPump.mo Outdated Show resolved Hide resolved
IBPSA/Fluid/SolarCollectors/Controls/CollectorPump.mo Outdated Show resolved Hide resolved
IBPSA/Fluid/SolarCollectors/Controls/CollectorPump.mo Outdated Show resolved Hide resolved
IBPSA/Fluid/SolarCollectors/Controls/CollectorPump.mo Outdated Show resolved Hide resolved
@mwetter mwetter merged commit 2ffbe9e into master May 21, 2024
3 checks passed
@mwetter mwetter deleted the issue1883_solarCollectors branch May 21, 2024 13:29
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

Successfully merging this pull request may close these issues.

Move solar collectors from Buildings to IBPSA
2 participants