diff --git a/js/menus/templates/EStaticMenuView.html b/js/menus/templates/EStaticMenuView.html index 1978bf581b34f749cc5b4028e2bd8dc5970f11ac..31a5565c05889f3524088660053763d3fb398d34 100644 --- a/js/menus/templates/EStaticMenuView.html +++ b/js/menus/templates/EStaticMenuView.html @@ -1,4 +1,5 @@ <% if(conductorGroups && conductorGroups.length > 0){ %> + Simulation Resolution: <input data-property="simulationRes" value="<%= simulationRes %>" placeholder="Resolution" class="form-control intInput eSim voltageInput" type="text"><br/><br/> Dielectric Permittivity (k): <input data-property="dielectricPerm" value="<%= dielectricPerm %>" placeholder="k" class="form-control floatInput eSim voltageInput" type="text"><br/> <label class="radio"> <input type="radio" <% if (visibleConductorGroup == -2){ %>checked<% } %> name="visibleConductorGroup" value="-2" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span> @@ -32,12 +33,21 @@ <li><a class="eSim dropdownSelector" data-property="currentUnits" data-value="<%= key %>" href="#"><%= unit %></a></li> <% }); %> </ul> - </div><br/><br/> - - <div class="inlineSwatch capacitance"></div>Capacitance:<br/> - <div class="inlineSwatch inductance"></div>Inductance:<br/><br/> + </div><br/><br/><br/> + <!--<div class="inlineSwatch inductance"></div>Inductance:<br/><br/>--> + Num Relaxation Steps: <input data-property="numRelaxationSteps" value="<%= numRelaxationSteps %>" placeholder="Num Steps" class="form-control floatInput eSim" type="text"><br/><br/> + <a href="#" id="calcEField" class="btn btn-block btn-lg btn-default"><% if(electricField){ %>Re-<% } %>Calculate Electric Field</a><br/> <a href="#" id="calcCapacitance" class="btn btn-block btn-lg btn-default"><% if(globalCapacitance){ %>Re-<% } %>Calculate Capacitance</a><br/> - <a href="#" id="calcInductance" class="btn btn-block btn-lg btn-default"><% if(globalInductance){ %>Re-<% } %>Calculate Inductance</a><br/> + <div class="inlineSwatch capacitance"></div>Global Capacitance:<br/><br/> + <!--<a href="#" id="calcInductance" class="btn btn-block btn-lg btn-default"><% if(globalInductance){ %>Re-<% } %>Calculate Inductance</a><br/>--> + Visible Field: + <% _.each(visibleStaticSimTypes, function(simType, key){ %> + <label class="radio"> + <input type="radio" <% if (key == visibleStaticSim){ %>checked<% } %> name="visibleStaticSim" value="<%= key %>" data-toggle="radio" class="custom-radio eSim"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span> + <%= simType%> + </label> + <% }); %> + Simulation Z Height: <input data-property="simZHeight" value="<%= simZHeight %>" placeholder="Height" class="form-control intInput eSim" type="text"><br/><br/> <% } else { %> <div class="inlineWarning">No conductive groups detected, please navigate to previous tab and calculate.</div> <% } %> \ No newline at end of file diff --git a/js/plists/ESimPlist.js b/js/plists/ESimPlist.js index 65a427192bf15ae0411e13c576c31be10a0cb9f5..21909407bf4d79ef5ab4be0795eb51c9a7bfd036 100644 --- a/js/plists/ESimPlist.js +++ b/js/plists/ESimPlist.js @@ -16,6 +16,13 @@ define([], function(){ allVoltageUnits:{ 1: "V", 0.001: "mV" + }, + + visibleStaticSimTypes: { + none: "None", + eField: "Electric Field", + charge: "Charge Distribution", + capacitance: "Capacitance" } } diff --git a/js/simulation/electronics/eSim.js b/js/simulation/electronics/eSim.js index 04af98517183419ed446fcde61d0d20721b70ced..e8ec927083e2bba9360eedc59c3f527f81ee7804 100644 --- a/js/simulation/electronics/eSim.js +++ b/js/simulation/electronics/eSim.js @@ -9,12 +9,22 @@ define(['underscore', 'backbone'], function(_, Backbone){ defaults:{ conductorGroups: null,//[{id: xx, current:xx, voltage:xx}] - visibleConductorGroup: -1, - globalCapacitance: null, + visibleConductorGroup: -1,//-2 = show everything, -1 = show all conductors globalInductance: null, voltageUnits: "1", currentUnits: "0.001", - dielectricPerm: 1.00 + dielectricPerm: 1.00, + + simulationRes: 3, + simZHeight: 1, + + //statics + electricField: null, + chargeField: null, + capacitanceField: null, + globalCapacitance: null, + numRelaxationSteps: 5, + visibleStaticSim: "none"//eField, charge, capacitance }