Branching and Decisions

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

Summer Computing Workshop. Introduction to Variables Variables are used in every aspect of programming. They are used to store data the programmer needs.
Solar House Project APES 2014.
Chapter 6 Solar Energy. Objectives State why solar energy is one of the long term options for energy independence. Describe 3 basic types of active solar.
 Building should be positioned to maximize desirable features and minimize negative aspects ◦ Energy Orientation ◦ Solar Orientation ◦ Room/Outdoor Area.
Landscaping to Help Conserve Energy Master Gardener Volunteers Training.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
By Emmi Miller and Jenny Sulouff
 On average, home heating uses more energy than any other system in a home  About 45% of total energy use  More than half of homes use natural gas.
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
Passive Solar House A passive solar house is heated by the sun’s energy.
BY Mason & Ciaran.  To save electricity set your home’s thermostat a little bit lower.  Doing that will save up to 5 percent on your home’s heating.
Green Home By Joe Conran, Jake Hollingsworth, and Brad Greipp.
Net-Zero Energy Classroom! Lets Design a….  Active Solar – PV (Photovoltaic) Panels convert sunlight into electricity.  Wind Power – When the wind blows,
Chris mccain Wayne biddy. The sun is a medium sized star that radiates energy from nuclear fusion reactions in its core. The small fraction of energy.
Summer Computing Workshop. Session 2 Input in Scratch  Multi-Character input - This is used when the user is prompted to enter a number or word.  Problems.
HVACR416 - Design Heat Loss / Heat Gain Part 2. External Loads The greatest external load is the sun. The suns heat can get into a building in one of.
PSU’s Finest Zero Energy Home Andrew Timmons, Josh Temple, Kurtis Myhre, Steven Fischer 1.
What is Energy?  Energy can come from the sun  It is used to power your home  Energy can be used to heat things  It is used to create electricity.
 On average, home heating uses more energy than any other system in a home  About 45% of total energy use  More than half of homes use natural gas.
1 ISAT Module III: Building Energy Efficiency Topic 7: Transient Heating and Air Conditioning Loads  Thermal Admittance  Intermittent Heating 
9. THERMAL MASS  Thermal mass is a measure of a material's capacity to absorb heating or cooling energy. Materials such as concrete or bricks are highly.
Down Coats. Snow Boots Scarf, Hat and Gloves Thermals or Long Johns.
Environmentally Friendly House Gateway – Unit 7 – Green Architecture © 2012 Project Lead The Way, Inc.Green Architecture.
 On average, home heating uses more energy than any other system in a home  About 45% of total energy use  More than half of homes use natural gas.
By Alexa Klipp, Bailey Rolfing, and Jessica Clydesdale
A New Language Shining the Light on Passive Solar Features and Retrofit Possibilities.
Some Pointers for your assignment..  Passive solar heating is defined as using solar energy incident on windows, skylights, greenhouses, clerestories,
Thermal energy. Temperature is a measure of… The total amount of energy in an object The total amount of thermal energy in an object How much heat something.
Solar Energy Home Tour A preview to our local field trip.
Computer Programming Modeling a Passive Solar Home.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Computer Programming Modeling a Passive Solar Home.
Every 15 minutes, the earth receives enough energy from the sun to meet the energy needs for the entire world for 1 year! A house with windows facing.
Global Wind Belts & the Jet Stream
__________________________ © Cactus Moon Education, LLC. Cactus Moon Education, LLC. CACTUS MOON EDUCATION, LLC ENERGY FROM.
High-Tech Material Cools Buildings, Sends Heat Into Space
PASSIVE SOLAR DESIGN TECHNIQUES
Scratch for Interactivity
AN-NAJAH NATIONAL UNIVERSITY BUILDING DEPARTMENT
Passive Solar Design Elements
Intro CS – Probability and Random Numbers
Passive Solar Energy By: David Jung.
Solar System and the Earth-Sun Relationship
Heat.
GREEN BUILDING MODEL Prashant Motwani (13MST0021)
Energy & Its Impact on Global Society
Achieving Energy Sustainability
Notes 7: Using Heat Chapter 6 Section 3 Page 172.
Bell work Predict whether leaving the refrigerator door open on a hot summer day will help to cool the kitchen.
Solar Insulation Principles
CPS120: Introduction to Computer Science
Environmental house project
Scratch: selection / branching/ if / If…else / compound conditionals / error trapping by Mr. Clausen.
Recap the basics Lesson 1.
Zoning Methods There are an unlimited number of ways to zone a home! Popular ways include: More than one single zone HVAC system. Zone damper systems.
Wind.
Wind.
Wind.
Wind.
Game Over Module 4 Lesson 2.
Recap the basics Lesson 1.
Wind.
Wind.
Please tape Solar Vocabulary into your NB for our final project
Wind.
Presentation transcript:

Branching and Decisions Computer Programming Modeling a Passive Solar Home

What We Have Done We have created a sequential program the performs several calculations We added a loop to repeat these calculations in order to estimate the indoor temperature of a house over a longer period of time Have the students bring up Scratch on their computers to follow along.

Branching and Decisions Sometimes we want to do something only if something else is true Example: A thermostat turns on the heat in your home only if the temperature is below the desired temperature. Otherwise the heater is left off This could be written as If the indoor temperature is below the desired temperature then Turn on the heater Else Turn off the heater Have the students bring up Scratch on their computers to follow along.

Branching in Scratch You can use the “If” Control blocks to branch in scratch The block on the left runs the blocks inside of it if a condition is true The block on the right runs one set of blocks if the condition is true and a different set of blocks if it is not true (“else”).

Activity: Moving a Sprite Open a new Scratch file and go to the script tab for the sprite Make the script shown to the right that has the Sprite move during the first 5 times through the loop and spin otherwise Run the script by clicking on the flag You will need to create the variable “mycounter” and add blocks to initialize it to zero and to increment it by 1 each time through the loop.

Activity: Moving a Sprite Does the behavior match your expectation? Modify the condition (change the five to another number, use an “equal” operator instead of “>”, etc.) and observe the effects.

Using myCounter In the example, a new variable was made called “myCounter”. It could have had any name. Its only purpose was to count how many times the loop was performed. It increases by 1 each time through the loop. You do not need a variable for counting if your decision was based off of something else, such as indoor temperature.

Activity: Heat Loss in a Home You will modify your indoor temperature model to allow passive solar heating to be added in the second hour. This is a simplified model where the sun rises instantly after 6 hours of letting a house cool down

Passive Solar Heating Passive solar heating can reduce energy use in many areas of the country where there are sunny days during cold winter months Solar heating takes advantage of available sunshine to heat a home Passive means the heating occurs without active mechanical systems or daily intervention of the people living in the home Solar can also produce hot water and electricity Public image from energy.gov: http://energy.gov/maps/solar-energy-potential .

Passive Solar Homes Passive solar homes typically include Ample window area with southern exposure High efficiency windows that better retain inside heat Construction techniques and materials that reduce heat loss and store warmth Features that reduce solar heat input during summer months Original image of a passive solar home in NC. The three large windows face south while the other window faces east. A four inch thick concrete floor moderates temperature swings.

Accounting for Passive Solar Gain In our prior model we used the following equations to calculate the temperature change:

Accounting for Passive Solar Gain Passive solar heat gain can be thought of as a “negative heat loss”. That is to say, if your loss is negative, you’ve gained heat. Thinking about passive solar heat gain in this way allows us to use the same equation and model as before. We subtract solar gain from the heat loss when solar gain is available. In Scratch, the command would be Change Heat Loss by (-1 * Solar Gain)