-
Notifications
You must be signed in to change notification settings - Fork 0
/
template2.html
177 lines (135 loc) · 5.98 KB
/
template2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},displayAlign: "center"});
</script>
<script async src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<title>Optics Calculator</title>
</head>
<body ng-app="main">
<div class="row" id="Diffraction_limited" ng-controller="control_panel">
<div class="col">
<ul style="list-style-type:none;">
<li class="logo"><a href="main.html"><img src="image/Simtrum.jpg"></a></li>
</ul>
<!-- <h1 class="title">Diffraction-limited angular resolution<small><span data-toggle="collapse" data-target="#info_Diffraction_limited" class="glyphicon glyphicon-collapse-down"></span></small></h1>
-->
<h1 class="title">Diffraction-limited angular resolution <button type="button" data-toggle="collapse" data-target="#info_Diffraction_limited" class="btn btn-default btn-sm">
<large><span class="glyphicon glyphicon-collapse-down"></large></span>Click here for formula
</button></h1>
</div>
<div class="col">
<div id="info_Diffraction_limited" class="collapse" >
<p style="text-align:left">This calcaulator will help you computes the radiance of a laser beam propagating in a multi-mode or double-clad optical fiber</p>
<b><h2 style="text-align:left;"> $\theta$ = arcsin(NA) </h2></b>
<b><h2 style="text-align:left;"> $\Omega$ = $\pi$NA$^2$ $\Omega$ = 2$\pi$(1-cos$\theta$)</h2></b>
<b><h2 style="text-align:left;"> A = $\pi\frac{D^2}{4}$ R = $\frac{P}{A\Omega}$</h2></b>
<p style="text-align:left;">Optical Power, <b>P</b>; Fiber Core Diameter, <b>D</b>; Fiber Numerical Aperture, <b>NA</b></p>
<p style="text-align:left;">Beam's Divergence Solid Angle, <b>$\Omega$</b>; Fiber Core Area, <b>A</b>; Radiance, <b>R</b></p>
</div><br>
<fieldset class="input">
<legend><b>Input</b></legend>
<div class="box">
<div class="row bottom_align_row">
<div class="col-xs-5">
<h5>Optical Power, P: </h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="Optical" ng-change="myFunc()">
<span class="input-group-addon">W</span>
</div><br>
</div>
<div class="col-xs-5">
<h5>Fiber Core Diameter, D: </h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="diameter" ng-change="myFunc()">
<span class="input-group-addon">µm</span>
</div>
</div>
</div>
<div class="row bottom_align_row">
<div class="col-xs-5">
<h5>Fiber Numerical Aperture:</h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="NA" ng-change="myFunc()">
<span class="input-group-addon"></span>
</div><br>
</div><br>
</div>
</div>
</fieldset><br>
<fieldset class="output">
<legend><b>Output</b></legend>
<div class="row bottom_align_row">
<div class="col-xs-5">
<h5>Beam's Divergence Solid Angle, $\Omega$:</h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="ohm" readonly/>
<span class="input-group-addon">Steradian (sr)</span>
</div>
</div>
<div class="col-xs-5">
<h5>Fiber Core Area, A:</h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="Area" readonly/>
<span class="input-group-addon">µm$^2$</span>
</div>
</div>
</div>
<div class="row bottom_align_row">
<div class="col-xs-5">
<h5>Radiance R:</h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="Radiance" readonly/>
<span class="input-group-addon">W/(cm$^2$ sr)</span>
</div>
</div>
<div class="col-xs-5">
<h5>angle $\theta$:</h5>
<div class="input-group">
<input type="number" class="form-control" ng-model="radian" readonly/>
<span class="input-group-addon">radian</span>
</div>
</div>
</div><br>
</fieldset>
</div>
</body>
<script>
angular.module('main', [])
.controller('control_panel', ['$scope', function($scope) {
$scope.myFunc = function() {
$scope.Diameter=$scope.diameter*1e-6
$scope.radian=Math.asin($scope.NA);
$scope.ohm=Math.PI*Math.pow($scope.NA,2);
$scope.Area=(Math.PI*Math.pow($scope.Diameter,2)/4)*1e12;
$scope.Radiance=($scope.Optical/($scope.Area*$scope.ohm))*1e5;
};
}]);
</script>
<!--INPUT-->
<style>
fieldset {
background-color: #e6e6e6;
}
</style>
<!--OUTPUT-->
<style>
legend {
font-size: 25px;
border-radius: 10px 10px 0 0;
background-image: linear-gradient(to top , #03448c,#009999 90%);
background-color: #009999;
color: white;
text-align: center;
}
</style>
</style>
</html>