Difference between revisions of "Team:TAS Taipei/Software"

 
(20 intermediate revisions by 2 users not shown)
Line 109: Line 109:
 
                 <ul class="nav">
 
                 <ul class="nav">
 
                     <li>
 
                     <li>
                         <a href="#PM" class="pageNavBig">PR MODEL</a>
+
                         <a href="#PM" class="pageNavBig">PR CALCULATOR</a>
 
                     </li>
 
                     </li>
 
                     <li>
 
                     <li>
                         <a href="#BM" class="pageNavBig">BIOFILM MODEL</a>
+
                         <a href="#BM" class="pageNavBig">BIOFILM CALCULATOR</a>
 
                     </li>
 
                     </li>
 
                 </ul>
 
                 </ul>
Line 124: Line 124:
 
                     <div class="row">
 
                     <div class="row">
 
                         <h1 class="name col-lg-12">SOFTWARE</h1>
 
                         <h1 class="name col-lg-12">SOFTWARE</h1>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                            We’ve created four calculators based on our modeling data to <b>inform WWTP managers on the amount of Proteorhodopsin (PR) bacteria or biofilm-coated biocarriers they need to remove nanoparticles (NPs)</b>. Imagine yourself as a WWTP manager and try our PR and biofilm calculators below!
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                            Learn more about modeling for: <br>
 +
                            &nbsp;&nbsp;&nbsp;<a href="https://goo.gl/Ko1uWz">PR bacteria</a> <br>
 +
                            &nbsp;&nbsp;&nbsp;<a href="https://goo.gl/AATnBD">Biofilm</a> <br><br>
 +
                            Download our calculators <a href="https://github.com/igemsoftware2017/TAS_Taipei/releases/tag/1.0.0">here.</a>
 +
                        </h4>
 
                     </div>
 
                     </div>
 
                     <div class="this_border row"></div>
 
                     <div class="this_border row"></div>
Line 129: Line 142:
 
                 <section class="main">
 
                 <section class="main">
 
                     <div class="row" id="PM">
 
                     <div class="row" id="PM">
                         <h1 class="col-lg-12 title2">PR MODEL</h1>
+
                         <h1 class="col-lg-12 title2">PR BACTERIA CALCULATORS</h1>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                            <b>PR_Runner is a calculator that outputs the final NP concentration</b> given the following inputs: initial NP concentration, initial PR bacteria concentration and intended time. Try the PR_Runner calculator below! 
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                                <table>
 +
                                    <tbody>
 +
                                        <tr>
 +
                                            <td>Initial NP Concentration (micromolar)</td>
 +
                                            <td><input type="number" id="Ltwo" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Target NP Concentration (micromolar)</td>
 +
                                            <td><input type="number" id="targetL" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Retention Time (the amount of time water stays in the tank, hours)</td>
 +
                                            <td><input type="number" id="ttwo" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td colspan="2"><button onclick = "calculate3()">Calculate!</button></td>
 +
                                        </tr>
 +
                                        <tr><td colspan=2>Initial Bacteria Concentration Needed (# of bacteria/microliter):
 +
<span id="BacteriaResultConc">&nbsp;&nbsp;&nbsp;</span>
 +
                                        </tr>
 +
                                    </tbody>
 +
                                </table>
 +
                            </form>
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                            <b>ReversePR_Runner is a calculator that outputs the final bacteria concentration</b> given the following inputs: initial and target NP concentration and intended retention time. Try the ReversePR_Runner calculator below!
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                                <table>
 +
                                    <tbody>
 +
                                        <tr>
 +
                                            <td>Initial NP Concentration (micromolar)</td>
 +
                                            <td><input type="number" id="L" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Initial Bacteria Concentration (# of cells/microliter)</td>
 +
                                            <td><input type="number" id="R" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Amount of time that can be used for the process (hours)</td>
 +
                                            <td><input type="number" id="t" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td colspan="2"><button onclick = "calculate2()">Calculate!</button></td>
 +
                                        </tr>
 +
                                        <tr><td colspan=2>Resulting NP Concentration (micromolar): <span id="NPResultConc">&nbsp;&nbsp;&nbsp;</span>
 +
                                        </tr>
 +
                                    </tbody>
 +
                                </table>
 +
                            </form>
 +
                        </h4>
 
                     </div>
 
                     </div>
 
                     <div class="row" id="BM">
 
                     <div class="row" id="BM">
                         <h1 class="col-lg-12 title2">BIOFILM MODEL</h1>
+
                         <h1 class="col-lg-12 title2">BIOFILM CALCULATORS</h1>
 
                     </div>
 
                     </div>
 
                     <div class="row">
 
                     <div class="row">
 
                         <h4 class="para col-lg-12">
 
                         <h4 class="para col-lg-12">
                             filler
+
                             <b>Biofilm_Runner is a calculator that outputs the NP concentration of the effluent</b> given the following inputs: initial NP concentration, speed of water in contact with biofilm, total volume of container, time for biofilm to be in contact with NP solution, and the number of biocarriers used. Try the Biofilm_Runner calculator below!
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row" id="BiofilmCalculator">
 +
                        <h4 class="para col-lg-12">
 +
                                <table>
 +
                                    <tbody>
 +
                                        <tr>
 +
                                            <td>Initial nanoparticle concentration (micromolar)</td>
 +
                                            <td><input type="number" id="conc" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Speed of water in contact with biofilm (cm/min)</td>
 +
                                            <td><input type="number" id="velocity" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Total Volume of Container (L)</td>
 +
                                            <td><input type="number" id="volume" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Time for biofilm to be in contact with NP solution (minutes)</td>
 +
                                            <td><input type="number" id="biot" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td># of biocarriers used (SA of 44.8 cm<sup>2</sup> each)</td>
 +
                                            <td><input type="number" id="SA" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td colspan="2"><button onclick = "calculate()">Calculate!</button></td>
 +
                                        </tr>
 +
                                        <tr><td colspan=2>Resulting Nanoparticle Concentration (micromolar): <span id="bioNPResultConc">&nbsp;&nbsp;&nbsp;</span>
 +
                                        </tr>
 +
                                    </tbody>
 +
                                </table>
 +
                            </form>
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                            <b>ReverseBiofilm_Runner is a calculator that outputs the number of biocarriers</b> needed given the following inputs: initial and target NP concentration, speed of water in contact with biofilm, total volume of container, and time for biofilm to be in contact with NP solution. Try the ReverseBiofilm_Runner calculator below!
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row" id="BiofilmCalculator2">
 +
                        <h4 class="para col-lg-12">
 +
                                <table>
 +
                                    <tbody>
 +
                                        <tr>
 +
                                            <td>Initial NP concentration (micromolar)</td>
 +
                                            <td><input type="number" id="Inconc" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Target NP Concentration (micromolar)</td>
 +
                                            <td><input type="number" id="targetConc" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Speed of Water in contact with Biofilm (cm/min)</td>
 +
                                            <td><input type="number" id="velocity2" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Total Volume of tank (L)</td>
 +
                                            <td><input type="number" id="Vtwo" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td>Total time biofilm is in contact with NP solution (minutes)</td>
 +
                                            <td><input type="number" id="biottwo" value="0"></td>
 +
                                        </tr>
 +
                                        <tr>
 +
                                            <td colspan="2"><button onclick = "calculate4()">Calculate!</button></td>
 +
                                        </tr>
 +
                                        <tr><td colspan=2># of biocarriers needed (SA of 44.8 cm<sup>2</sup> each): <span id="bioNPResultSA">&nbsp;&nbsp;&nbsp;</span>
 +
                                        </tr>
 +
                                    </tbody>
 +
                                </table>
 +
                            </form>
 +
                        </h4>
 +
                    </div>
 +
                    <div class="row">
 +
                        <h4 class="para col-lg-12">
 +
                            All units of the output and the inputs are included in the program. Enter as many significant digits as possible for more accurate results. To inspect the code of each .jar files, unzip with tools like 7zip or Winzip and then use BlueJ (free Java IDE) to open the package.
 
                         </h4>
 
                         </h4>
 
                     </div>
 
                     </div>
Line 156: Line 310:
 
             }
 
             }
 
         });
 
         });
 +
        calculate = function(){
 +
            var conc = document.getElementById("conc").value;
 +
            var v = document.getElementById("velocity").value;
 +
            var SA = 44.8*document.getElementById("SA").value;
 +
            var V = document.getElementById("volume").value;
 +
            var t = document.getElementById("biot").value;
 +
            var tint = 5;
 +
            var ktrap = -0.000686;
 +
            var dNPdt = (ktrap*conc*v*SA)/(1000*V);
 +
            var resultConc = parseFloat(conc);
 +
           
 +
            for(var i = 0; i<(t/tint); i++){
 +
                dNPdt = (ktrap*resultConc*v*SA)/(1000*V);
 +
                resultConc = resultConc+tint*dNPdt;
 +
            }
 +
           
 +
            document.getElementById("bioNPResultConc").innerHTML = resultConc;
 +
        }
 +
        calculate4 = function(){
 +
            var conc = document.getElementById("Inconc").value;
 +
            var targetConc = document.getElementById("targetConc").value;
 +
            var startConc = parseFloat(conc);
 +
            var V = document.getElementById("Vtwo").value;
 +
            var v = document.getElementById("velocity2").value;
 +
            var t = document.getElementById("biottwo").value;
 +
            var SA = 1;
 +
            var tint = 5;
 +
            var ktrap = -0.00017331;
 +
            var dNPdt = (ktrap*conc*v*SA)/(1000*V);
 +
            var resultConc = parseFloat(conc);
 +
           
 +
            while(true){
 +
                resultConc = startConc;
 +
                for(var i = 0; i<(t/tint); i++){
 +
                    dNPdt = (ktrap*resultConc*v*SA)/(1000*V);
 +
                    resultConc = resultConc+tint*dNPdt;
 +
                }
 +
                if(Math.abs(resultConc-targetConc)>=0.01){
 +
                    if((resultConc-targetConc)>0){
 +
                        SA += 0.1;
 +
                    }else{
 +
                        SA -= 0.1;
 +
                    }
 +
                }else{
 +
                    break;
 +
                }
 +
            }
 +
           
 +
           
 +
            document.getElementById("bioNPResultSA").innerHTML = Math.round(SA*10000000/44.8)/10000000;
 +
        }
 +
        calculate2 = function(){
 +
            var L = document.getElementById("L").value;
 +
            var R = document.getElementById("R").value;
 +
            var C = 0;
 +
            var t = document.getElementById("t").value;
 +
            var tStep = 0.1;
 +
            var kOn = 0.00000035;
 +
            var kOff = 0.32;
 +
            var dcdt = kOn*L*R - kOff*C;
 +
 +
            for(var i = 0; i<(t/tStep); i++){
 +
                dcdt = Math.round(((kOn*L*R)-(kOff*C))*10000000)/10000000;
 +
                L = Math.round((L-(tStep*dcdt))*10000000)/10000000;
 +
                R = Math.round((R-(tStep*dcdt))*10000000)/10000000;
 +
                C = Math.round((C+(tStep*dcdt))*10000000)/10000000;
 +
            }
 +
 +
            document.getElementById("NPResultConc").innerHTML = L;
 +
        }
 +
        calculate3 = function(){
 +
            var L = document.getElementById("Ltwo").value;
 +
            var StartL = L;
 +
            var targetL = document.getElementById("targetL").value;
 +
            var StartR = 500000;
 +
            var C = 0;
 +
            var t = document.getElementById("ttwo").value;
 +
            var tStep = 0.1;
 +
            var kOn = 0.00000035;
 +
            var kOff = 0.32;
 +
            var dcdt = kOn*L*R - kOff*C;
 +
            var R = 0;
 +
 +
            while(true){
 +
                R = StartR;
 +
                L = StartL;
 +
                for(var i = 0; i<(t/tStep); i++){
 +
                    dcdt = Math.round(((kOn*L*R)-(kOff*C))*100000000)/100000000;
 +
                    L = Math.round((L-(tStep*dcdt))*100000000)/100000000;
 +
                    R = Math.round((R-(tStep*dcdt))*100000000)/100000000;
 +
                    C = Math.round((C+(tStep*dcdt))*100000000)/100000000;
 +
                }
 +
                if(Math.round((Math.abs(L-targetL)*100000000)/100000000)>=0.0001){
 +
                    if((L-targetL)>0){ 
 +
                        StartR += 100;
 +
                    }else{
 +
                        StartR -= 100;
 +
                    }
 +
                }else{
 +
                    break;
 +
                }
 +
            }
 +
            document.getElementById("BacteriaResultConc").innerHTML = StartR;
 +
        }
 
         $(function() {
 
         $(function() {
 
             $('.yellow').removeClass('active');
 
             $('.yellow').removeClass('active');

Latest revision as of 13:52, 1 November 2017

X

Project

Experiment

Modeling

Prototype

Human Practice

Biosafety

About Us

Attributions

Home
hi

SOFTWARE

We’ve created four calculators based on our modeling data to inform WWTP managers on the amount of Proteorhodopsin (PR) bacteria or biofilm-coated biocarriers they need to remove nanoparticles (NPs). Imagine yourself as a WWTP manager and try our PR and biofilm calculators below!

Learn more about modeling for:
   PR bacteria
   Biofilm

Download our calculators here.

PR BACTERIA CALCULATORS

PR_Runner is a calculator that outputs the final NP concentration given the following inputs: initial NP concentration, initial PR bacteria concentration and intended time. Try the PR_Runner calculator below!

Initial NP Concentration (micromolar)
Target NP Concentration (micromolar)
Retention Time (the amount of time water stays in the tank, hours)
Initial Bacteria Concentration Needed (# of bacteria/microliter):    

ReversePR_Runner is a calculator that outputs the final bacteria concentration given the following inputs: initial and target NP concentration and intended retention time. Try the ReversePR_Runner calculator below!

Initial NP Concentration (micromolar)
Initial Bacteria Concentration (# of cells/microliter)
Amount of time that can be used for the process (hours)
Resulting NP Concentration (micromolar):    

BIOFILM CALCULATORS

Biofilm_Runner is a calculator that outputs the NP concentration of the effluent given the following inputs: initial NP concentration, speed of water in contact with biofilm, total volume of container, time for biofilm to be in contact with NP solution, and the number of biocarriers used. Try the Biofilm_Runner calculator below!

Initial nanoparticle concentration (micromolar)
Speed of water in contact with biofilm (cm/min)
Total Volume of Container (L)
Time for biofilm to be in contact with NP solution (minutes)
# of biocarriers used (SA of 44.8 cm2 each)
Resulting Nanoparticle Concentration (micromolar):    

ReverseBiofilm_Runner is a calculator that outputs the number of biocarriers needed given the following inputs: initial and target NP concentration, speed of water in contact with biofilm, total volume of container, and time for biofilm to be in contact with NP solution. Try the ReverseBiofilm_Runner calculator below!

Initial NP concentration (micromolar)
Target NP Concentration (micromolar)
Speed of Water in contact with Biofilm (cm/min)
Total Volume of tank (L)
Total time biofilm is in contact with NP solution (minutes)
# of biocarriers needed (SA of 44.8 cm2 each):    

All units of the output and the inputs are included in the program. Enter as many significant digits as possible for more accurate results. To inspect the code of each .jar files, unzip with tools like 7zip or Winzip and then use BlueJ (free Java IDE) to open the package.