diff --git a/README.md b/README.md index d834b8b..b245657 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ A stand-alone example Excel file is given in [examplePressureLoss&RoughnessConve **WARNING:** please do not load the developed Excel add-in [ExcelAdd-In_PressureLoss.xlam](ExcelAdd-In_PressureLoss.xlam) in this stand-alone example Excel file because it already involves of the functions packed in this Excel add-in. Otherwise you will have two of the same functions and modules in your VBA library, one from the example Excel file and the other from the Excel add-in!!! ### Description of the Example Excel File -There are four different worksheets in this example Excel file [examplePressureLoss&RoughnessConverters.xlsm](examplePressureLoss%26RoughnessConverters.xlsm), each hosts to illustration of usage for different functions, details given below. It should be noted that each Excel WorkSheet has the layout of *INPUTS* on the left-hand side and the *USAGE EXAMPLE* on the right-hand side, latter involves of the calculator functions in use (Check the [ScreenShot](zScreenShots/ScreenShot_How2Use_PressureLossCalculator.png)). Another note is that this Excel file follows a consistent formatting by use of cell styles (e.g. calculation results in *calculation* style, the results in *output* style etc.). +There are four different worksheets in this example Excel file [examplePressureLoss&RoughnessConverters.xlsm](examplePressureLoss%26RoughnessConverters.xlsm), each hosts to illustration of usage for different functions, details given below. It should be noted that each Excel WorkSheet has the layout of *INPUTS* on the left-hand side and the *USAGE EXAMPLE* on the right-hand side, latter involves of the calculator functions in use (Please check the [ScreenShot](zScreenShots/ScreenShot_How2Use_PressureLossCalculator.png)). Another note is that this Excel file follows a consistent formatting by use of cell styles (e.g. calculation results in *calculation* style, the results in *output* style etc.). - **WorkSheet _"PressureLossCalculator"_:** This first Excel WorkSheet *PressureLossCalculator* shows the usage of the pressure loss calculator function [PressureLossCalculator.bas](Modules-UDFs/PressureLossCalculator.bas) as *PressureLoss(L, D, aRou, mFlow, T, P, Solver, Algorithm, fTol, MaxIter)*, respectively, the input arguments being the length of the pipe segment, the water mass flow rate, the water temperature, the hydrostatical water pressure, the solver as optional (the default is as "Darcy-Weisbach"), the algorithm as optional (the default is as "Clamond"), and iteration inputs as optional (valid only for the algorithm "Colebrook-White") fTol as the iteration tolerance and MaxIter as the maximum amount of steps for the iteration. For example, the cell "G5" host the pressure loss calculation as based on the "Darcy-Weisbach" solver with "Clamond" algorithm and the cell "G14" as based on the "Hazen-Williams" solver (no friction factor algorithm this time - please trace the precendents from the INPUTS section). @@ -40,12 +40,12 @@ For example, the cell "F5" has the return from the [f_ColebrookWhite function](M - **Other WorkSheets :** The other Excel WorkSheets *"zPipeCatalogue"* and *"zDiskinData"* are not an illustration of usage but a required data for this example Excel file [examplePressureLoss&RoughnessConverters.xlsm](examplePressureLoss%26RoughnessConverters.xlsm). The *zDiskinData* is necessary for the user-defined-functions developed (given in this repository), i.e. especially at functions [tConverterRoughness](Modules-UDFs/Converter_rRou2C.bas) and [tReynoldsLimits](Modules-UDFs/tHWLimitsReynolds.bas). ### Description of the Excel Add-In -The Excel add-in [ExcelAdd-In_PressureLoss.xlam](ExcelAdd-In_PressureLoss.xlam) allows using of the developed user-defined-functions in any Excel file that your calculations take part. How to install the Excel add-in is well described in [Acompara J - How to Install an Excel Add-In - Guide @ExcelCampus.com](https://www.excelcampus.com/tools/how-to-install-an-excel-add-in-guide/). +The Excel add-in [ExcelAdd-In_PressureLoss.xlam](ExcelAdd-In_PressureLoss.xlam) allows using of the developed user-defined-functions in any Excel file that your calculations take part. How to install an Excel add-in is well described in the tutorial [Acompara J - How to Install an Excel Add-In - Guide @ExcelCampus.com](https://www.excelcampus.com/tools/how-to-install-an-excel-add-in-guide/). ### Description of Modules&Functions All of the modules developed within this repository are given in the folder [Modules-UDFs](Modules-UDFs). Generally, each of these modules hosts to a unique Excel functions developed, as shown in the table at section [List of Functions](README.md#list-of-functions). Here the idea is to present an overview of the Excel functions. Besides, one can use some of the Excel functions developed partially if other functions are not required by simply importing the bas file/s or copy&pasting them on the Visiual Basic Editor. -Please note that, after copy&paste, you have to delete the first codeline in the .bas file. For example, if you need only of the converter function, after copy&paste, you have to delete the line _Attribute VB_Name = "Converter_f2C"_ in the [Converter_f2C.bas](Modules-UDFs/Converter_f2C.bas) or (another example) if you need only of the Clamond algorithm you have the delete the _Attribute VB_Name = "DWf_Clamond"_ from the code lines of [dwf_Clamond.bas](Modules-UDFs/dwf_Clamond.bas). [A screenshot of How2Do!](zScreenShots/DeleteAttributes-f_Clamond.png). +Please note that, after copy&paste, you have to delete the first codeline in the .bas file. For example, if you need only of the converter function, after copy&paste, you have to delete the line _Attribute VB_Name = "Converter_f2C"_ in the [Converter_f2C.bas](Modules-UDFs/Converter_f2C.bas) or (another example) if you need only of the Clamond algorithm you have the delete the _Attribute VB_Name = "DWf_Clamond"_ from the code lines of [dwf_Clamond.bas](Modules-UDFs/dwf_Clamond.bas). Please check the [Screenshot of How2Do](zScreenShots/DeleteAttributes-f_Clamond.png). ### List of Functions Here is the list of functions developed and in use (latter original works by other Developers): @@ -66,7 +66,7 @@ Here is the list of functions developed and in use (latter original works by oth | **LogBase** (x, base) | User-Defined VBA function returning the logarithm of a given number _x_ at a given base of _base_ | [zOtherTools.bas](Modules-UDFs/zOtherTools.bas) | | **PiNumber** () | User-Defined VBA function returning the Pi number at the highest precision | [zOtherTools.bas](Modules-UDFs/zOtherTools.bas) | | **Linterp** (KnownYs, KnownXs, NewX) | Linear interpolation function - developed by Wells, Ryan | [zInterp_Wells.bas](Modules-UDFs/zInterp_Wells.bas) | -| **XSteam Module** | A collection of functions returning the water properties at a given operational condition (e.g. _rhoL_T(T)_ returns the water density as a function of temperature _T_) - developed by Holmgren, Magnus | [zXSteam.bas](Modules-UDFs/zXSteam.bas) | +| **XSteam Module** | A collection of functions returning the water properties at a given operational condition (e.g. _rhoL_T(T)_ returns the water density as a function of temperature _T_) - developed by Holmgren, Magnus - Please note that for ease of use while calling the XSteam functions in pressure loss calculator functions developed, the XSteam module is integrated to our modules in the VBA library instead of usage of XSteam.xla add-in. | [zXSteam.bas](Modules-UDFs/zXSteam.bas) | ## License You are free to use, modify and distribute the code as long as authorship is properly acknowledged. The same applies for the original works 'XSteam' by Holmgren M. and 'colebrook.vb' by Clamond D, this repository functions make use of.