@@ -126,21 +126,21 @@ module TrussImplementation =
126126 | BuilderDomain.SupportBuilder.Pin ( p,_) -> p.joint
127127 let getJointFromSupport ( s : Support ) = match s with | Pin p -> Some p.normal.joint | Roller r -> Some r.joint | _ -> None
128128
129- let sumForcesX ( p : TrussPart list) =
129+ let sumForcesX ( p : Part list) =
130130 let forces = List.choose ( fun x -> match x with | Force f -> Some ( getComponentForcesFrom f) | _ -> None) p
131131 List.fold ( fun acc x -> x.magnitudeX + acc ) 0. forces
132- let sumForcesY ( p : TrussPart list) =
132+ let sumForcesY ( p : Part list) =
133133 let forces = List.choose ( fun x -> match x with | Force f -> Some ( getComponentForcesFrom f) | _ -> None) p
134134 List.fold ( fun acc y -> y.magnitudeY + acc ) 0. forces
135- let sumForceMoments ( s : Support ) ( p : TrussPart list) =
135+ let sumForceMoments ( s : Support ) ( p : Part list) =
136136 let forces = List.choose ( fun x -> match x with | Force f -> Some ( getComponentForcesFrom f) | _ -> None) p
137137 let j = getJointFromSupport s
138138 let getMomentArmY fj = ( getYFrom fj - getYFrom j.Value)
139139 let getMomentArmX fj = ( getXFrom fj - getXFrom j.Value)
140140 List.fold ( fun acc cf -> cf.magnitudeX*( getMomentArmY cf.atJoint) + cf.magnitudeY*( getMomentArmX cf.atJoint) + acc ) 0. forces
141141
142142 // Support Reaction Equations
143- let getXForceReactionEquation ( p : TrussPart list) =
143+ let getXForceReactionEquation ( p : Part list) =
144144 let supports = List.choose ( fun x -> match x with | Support s -> Some s | _ -> None) p
145145 let reactions = List.mapi ( fun i x ->
146146 match x with
@@ -152,7 +152,7 @@ module TrussImplementation =
152152 Math.Abs x/ d, " Rx" + i.ToString()
153153 | _ -> 0.0 , " Not Implemented" ) supports
154154 createEquation ( sumForcesX p) reactions
155- let getYForceReactionEquation ( p : TrussPart list) =
155+ let getYForceReactionEquation ( p : Part list) =
156156 let supports = List.choose ( fun y -> match y with | Support s -> Some s | _ -> None) p
157157 let reactions = List.mapi ( fun i y ->
158158 match y with
@@ -164,7 +164,7 @@ module TrussImplementation =
164164 y/ d, " Ry" + i.ToString()
165165 | _ -> 0.0 , " Not Implemented" ) supports
166166 createEquation ( sumForcesY p) reactions
167- let addSupportXY ( p : TrussPart list) =
167+ let addSupportXY ( p : Part list) =
168168 let supports = List.choose ( fun x -> match x with | Support s -> Some s | _ -> None) p
169169 match supports with
170170 | [] -> false
@@ -174,7 +174,7 @@ module TrussImplementation =
174174 match m = 0. || m = Double.PositiveInfinity with | true -> false | false -> true
175175 | Pin p1 :: Pin p2 :: [] -> true
176176 | _ -> true
177- let supportXY rSting add ( p : TrussPart list) =
177+ let supportXY rSting add ( p : Part list) =
178178 let supports = List.choose ( fun y -> match y with | Support s -> Some s | _ -> None) p
179179 match supports with
180180 | [] -> []
@@ -193,7 +193,7 @@ module TrussImplementation =
193193 | true -> [ createEquation ( 0. ) [( 1. , rSting + i1.ToString());(- 1. , rSting + i2.ToString())]]
194194 | false -> []
195195 | _ -> []
196- let getYMomentReactionEquations ( p : TrussPart list) =
196+ let getYMomentReactionEquations ( p : Part list) =
197197 let supports = List.choose ( fun x -> match x with | Support s -> Some s | _ -> None) p
198198 let supportXY = supportXY " Rx" ( addSupportXY p) p
199199 let getSupportMoments ( s : Support ) =
@@ -212,7 +212,7 @@ module TrussImplementation =
212212 List.concat [ ly; lx]
213213 let momentEquations = List.map ( fun y -> createEquation ( sumForceMoments y p) ( getSupportMoments y)) supports
214214 List.concat [ momentEquations; supportXY]
215- let getXMomentReactionEquations ( p : TrussPart list) =
215+ let getXMomentReactionEquations ( p : Part list) =
216216 let supports = List.choose ( fun x -> match x with | Support s -> Some s | _ -> None) p
217217 let supportXY = supportXY " Ry" ( addSupportXY p) p
218218 let getSupportMoments ( s : Support ) =
@@ -235,12 +235,12 @@ module TrussImplementation =
235235 List.concat [ momentEquations; supportXY]
236236
237237 // Basic operations on truss
238- let addTrussPartToTruss ( t : Truss ) ( p : TrussPart ) =
238+ let addTrussPartToTruss ( t : Truss ) ( p : Part ) =
239239 match p with
240240 | Member m -> { t with members = m:: t.members}
241241 | Force f -> { t with forces = f:: t.forces}
242242 | Support s -> { t with supports = s:: t.supports}
243- let removeTrussPartFromTruss ( t : Truss ) ( p : TrussPart option) =
243+ let removeTrussPartFromTruss ( t : Truss ) ( p : Part option) =
244244 match p with
245245 | Some ( Member m) ->
246246 let mOut = List.except [ m] t.members
@@ -267,7 +267,7 @@ module TrussImplementation =
267267 | Hinge -> i, " Hinge"
268268 | Simple -> i, " Simple"
269269 // Method of Joints
270- let isColinear ( p1 : TrussPart ) ( p2 : TrussPart ) =
270+ let isColinear ( p1 : Part ) ( p2 : Part ) =
271271 match p1, p2 with
272272 | Member m1, Member m2 -> ( getMemberLineOfActionFrom m1) = ( getMemberLineOfActionFrom m2)
273273 | Member m1, Force f
@@ -277,7 +277,7 @@ module TrussImplementation =
277277 | Support (Pin p), Member m1
278278 | Member m1,Support (Pin (p)) -> (getMemberLineOfActionFrom m1) = (getLineOfActionFrom p.normal)*)
279279 | _ -> false
280- let getZFM ( tpl : TrussPart list) =
280+ let getZFM ( tpl : Part list) =
281281 match tpl with
282282 // case 1 -- no load, 2 non-colinear members, both members are zero force
283283 | [ Member m1; Member m2] when ( isColinear ( Member m1) ( Member m2)) = false -> [ Member m1; Member m2]
@@ -300,7 +300,7 @@ module TrussImplementation =
300300 | [ Member m1; Support s; Member m2]
301301 | [ Support s; Member m1; Member m2] when ( isColinear ( Member m2) ( Support s)) && (( isColinear ( Member m1) ( Member m2)) = false ) -> [ Member m1]
302302 | _ -> []
303- let partitionNode ( tpl : TrussNode list) =
303+ let partitionNode ( tpl : Node list) =
304304 List.map ( fun ( j , pl ) ->
305305 let zfm = getZFM pl
306306 let pl ' = List.except zfm pl
@@ -320,10 +320,10 @@ module TrussImplementation =
320320 let jointParts = getJointPartListFrom t
321321 let partition = partitionNode jointParts
322322 let zfm = getZeroForceMembers t
323- List.fold ( fun acc x -> match x with | ( j, pl,_ zfm) -> TrussNode ( j, List.except zfm pl):: acc) [] partition
323+ List.fold ( fun acc x -> match x with | ( j, pl,_ zfm) -> Node ( j, List.except zfm pl):: acc) [] partition
324324 let getMemberVariables ( t : Truss ) =
325325 let nl = getNodeList t
326- let processNode ( n : TrussNode ) =
326+ let processNode ( n : Node ) =
327327 let _j , pl = n
328328 let members =
329329 List.choose ( fun x -> match x with | Member m -> Some m | _ -> None) pl
@@ -358,7 +358,7 @@ module TrussImplementation =
358358 let d = match Math.Sqrt ( x* x + y* y) with | n when n = 0. -> 0. | n -> n
359359 let name = " M" + index.ToString()
360360 ( y/ d, name) //Math.Abs
361- let analyzeNode ( n : TrussNode ) ( t : Truss ) ( r : SupportReactionResult list ) =
361+ let analyzeNode ( n : Node ) ( t : Truss ) ( r : SupportReactionResult list ) =
362362 let j , pl = n
363363 let supportReactions =
364364 let s = List.tryFind ( fun x -> match x with | Support _ -> true | _ -> false ) pl
@@ -380,7 +380,7 @@ module TrussImplementation =
380380 List.choose ( fun y -> match y with | Member m -> Some m | _ -> None) pl
381381 |> List.map ( fun y -> getMemberExpressionsY j y ( getMemberIndex y t))
382382 [ createEquation sumfx membersX; createEquation sumfy membersY]
383- let getMemberForceAtJoint ( j : Joint ) ( m : TrussPart ) ( mf : TrussMemberForce list ) =
383+ let getMemberForceAtJoint ( j : Joint ) ( m : Part ) ( mf : TrussMemberForce list ) =
384384 let tf = List.tryFind ( fun ( _f , p ) -> p = m ) mf
385385 match tf with
386386 | None -> m
0 commit comments