Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

layout post
title U-Value Calculator
date 2023-12-20 18:48:49 +0300
modify_date 2023-12-29 18:48:49 +0300
tags javascript web-development energy-efficiency
category tutorial

Building a U-Value Calculator with JavaScript

In this tutorial, we'll guide you through using the U-Value Calculator script that we've built with JavaScript. This calculator allows you to assess the energy efficiency of different construction assemblies by calculating the U-Value.

Prerequisites

Before you begin, make sure you have the following:

  • Basic understanding of JavaScript, HTML, and CSS.
  • A text editor to modify the code.
  • A web browser to run the script.

Getting Started

  1. Download the Script:

    • Download the U-Value Calculator script from GitHub.
  2. Include Scripts in HTML:

    • Include the necessary scripts in your HTML file:
    <script src="https://unpkg.com/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
    <script src="https://unpkg.com/tippy.js@6.3.1/dist/tippy-bundle.umd.min.js"></script>
    <script src="uvalue-calculator.js"></script>
    <script src="drawing.js"></script>
    <script src="script.js"></script>
  3. HTML Structure:

    • Create the HTML structure for the U-Value Calculator in your HTML file. This will include elements for material selection, thickness input, layer display, and the result display.

Adding a Material

To add a new material to the calculator, follow these steps:

  1. Open the manualMaterial.js file.

  2. Find the materials object, which contains predefined materials and their thermal conductivities.

  3. Add a new material by appending a new key-value pair. For example:

    materials["New Material Name"] = "Conductivity Value";

Using the Calculator

1. Open your HTML file in a web browser.

2. Select a material from the dropdown menu.

3. Enter the thickness of the material.

4. Click the "Add Layer" button to add the material layer.

5. Repeat the process to add additional layers.

6. Click the "Calculate U-Value" button to calculate the overall U-Value.

7. View the calculated U-Value in the result section.

Screenshot

U-Value Calculator

Conclusion

Congratulations! You've successfully used the U-Value Calculator script. You can customize and extend the functionality based on your project requirements.

Feel free to explore the code and experiment with adding materials to suit your specific needs. If you encounter any issues or have questions, refer to the documentation or reach out to the script's maintainers on GitHub.

Happy calculating!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages