neuper@37906
|
1 |
(* chapter 'Biegelinie' from the textbook:
|
neuper@37906
|
2 |
Timischl, Kaiser. Ingenieur-Mathematik 3. Wien 1999. p.268-271.
|
neuper@37999
|
3 |
author: Walther Neuper 050826,
|
neuper@37906
|
4 |
(c) due to copyright terms
|
neuper@37906
|
5 |
*)
|
neuper@37906
|
6 |
|
wneuper@59424
|
7 |
theory Biegelinie imports Integrate Equation EqSystem Base_Tools begin
|
neuper@37906
|
8 |
|
walther@60023
|
9 |
section \<open>Constants specific for Biegelinie\<close>
|
walther@60023
|
10 |
|
neuper@37906
|
11 |
consts
|
neuper@42385
|
12 |
qq :: "real => real" (* Streckenlast *)
|
neuper@37999
|
13 |
Q :: "real => real" (* Querkraft *)
|
neuper@37999
|
14 |
Q' :: "real => real" (* Ableitung der Querkraft *)
|
walther@60278
|
15 |
M_b :: "real => real" ("M'_b") (* Biegemoment *)
|
walther@60278
|
16 |
(*M_b' :: "real => real" ("M_b' ") ( * Ableitung des Biegemoments
|
walther@60278
|
17 |
Isabelle2020: new handling of quotes in mixfix in, so the parser cannot distinguish M_b M_b'
|
walther@60086
|
18 |
|
walther@60086
|
19 |
Outcommenting causes error at Neigung_Moment: "y'' x = -M_b x/ EI" below:
|
walther@60086
|
20 |
Ambiguous input\<^here> produces 2 parse trees:
|
walther@60086
|
21 |
("\<^const>HOL.Trueprop"
|
walther@60086
|
22 |
("\<^const>HOL.eq" ("_applC" ("_position" y'') ("_position" x))
|
walther@60278
|
23 |
("\<^const>Fields.inverse_class.inverse_divide" ("\<^const>Groups.uminus_class.uminus" ("_applC" ("\<^const>Biegelinie_Test.M_b") ("_position" x)))
|
walther@60086
|
24 |
("_position" EI))))
|
walther@60086
|
25 |
("\<^const>HOL.Trueprop"
|
walther@60086
|
26 |
("\<^const>HOL.eq" ("_applC" ("_position" y'') ("_position" x))
|
walther@60278
|
27 |
("\<^const>Fields.inverse_class.inverse_divide" ("\<^const>Groups.uminus_class.uminus" ("_applC" ("\<^const>Biegelinie_Test.M_b'") ("_position" x)))
|
walther@60086
|
28 |
("_position" EI))))
|
walther@60086
|
29 |
Ambiguous input -------------------------------------------------------------------------------------------------------^^^^^^
|
walther@60086
|
30 |
2 terms are type correct:
|
walther@60086
|
31 |
((y'' x) = ((- (M_b x)) / EI))
|
walther@60086
|
32 |
((y'' x) = ((- (M_b x)) / EI))
|
walther@60086
|
33 |
Failed to parse prop
|
walther@60086
|
34 |
*)
|
neuper@37999
|
35 |
y'' :: "real => real" (* 2.Ableitung der Biegeline *)
|
neuper@37999
|
36 |
y' :: "real => real" (* Neigung der Biegeline *)
|
neuper@37999
|
37 |
(*y :: "real => real" (* Biegeline *)*)
|
neuper@37999
|
38 |
EI :: "real" (* Biegesteifigkeit *)
|
neuper@37906
|
39 |
|
walther@60023
|
40 |
|
walther@60023
|
41 |
section \<open>Descriptions extending Input_Descript.thy\<close>
|
walther@60023
|
42 |
|
walther@60023
|
43 |
consts
|
neuper@37999
|
44 |
Traegerlaenge :: "real => una"
|
neuper@37999
|
45 |
Streckenlast :: "real => una"
|
neuper@37999
|
46 |
BiegemomentVerlauf :: "bool => una"
|
neuper@37999
|
47 |
Biegelinie :: "(real => real) => una"
|
wneuper@59540
|
48 |
AbleitungBiegelinie :: "(real => real) => una"
|
neuper@37999
|
49 |
Randbedingungen :: "bool list => una"
|
neuper@37999
|
50 |
RandbedingungenBiegung :: "bool list => una"
|
neuper@37999
|
51 |
RandbedingungenNeigung :: "bool list => una"
|
neuper@37999
|
52 |
RandbedingungenMoment :: "bool list => una"
|
neuper@37999
|
53 |
RandbedingungenQuerkraft :: "bool list => una"
|
neuper@37999
|
54 |
FunktionsVariable :: "real => una"
|
neuper@37999
|
55 |
Funktionen :: "bool list => una"
|
neuper@37999
|
56 |
Gleichungen :: "bool list => una"
|
wneuper@59539
|
57 |
GleichungsVariablen :: "real list => una"
|
neuper@37906
|
58 |
|
walther@60023
|
59 |
|
walther@60023
|
60 |
section \<open>Theorems from statics, still as axioms\<close>
|
walther@60023
|
61 |
|
neuper@52148
|
62 |
axiomatization where
|
neuper@37906
|
63 |
|
neuper@52148
|
64 |
Querkraft_Belastung: "Q' x = -qq x" and
|
neuper@52148
|
65 |
Belastung_Querkraft: "-qq x = Q' x" and
|
neuper@37906
|
66 |
|
neuper@52148
|
67 |
Moment_Querkraft: "M_b' x = Q x" and
|
neuper@52148
|
68 |
Querkraft_Moment: "Q x = M_b' x" and
|
neuper@37906
|
69 |
|
walther@60079
|
70 |
Neigung_Moment: "y'' x = -M_b (x / EI)" and
|
walther@60079
|
71 |
Moment_Neigung: "(M_b x) = -EI * y'' x" and
|
neuper@37906
|
72 |
|
neuper@37906
|
73 |
(*according to rls 'simplify_Integral': .. = 1/a * .. instead .. = ../ a*)
|
walther@60278
|
74 |
make_fun_explicit: "~ (a =!= 0) ==> (a * (f x) = bb) = (f x = 1/a * bb)"
|
neuper@37906
|
75 |
|
walther@60023
|
76 |
|
walther@60023
|
77 |
section \<open>Acknowledgements shown in browsers of Isac_Knowledge\<close>
|
walther@60023
|
78 |
|
walther@60255
|
79 |
(* there will be other ways in Isabelle/PIDE * )
|
wneuper@59472
|
80 |
setup \<open>
|
neuper@55425
|
81 |
KEStore_Elems.add_thes
|
walther@60253
|
82 |
[Thy_Hierarchy.make_thy @{theory}
|
neuper@55425
|
83 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
84 |
Thy_Hierarchy.make_isa @{theory} ("IsacKnowledge", "Theorems")
|
neuper@55425
|
85 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
86 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("Belastung_Querkraft", @{thm Belastung_Querkraft})
|
neuper@55425
|
87 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
88 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("Moment_Neigung", @{thm Moment_Neigung})
|
neuper@55425
|
89 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
90 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("Moment_Querkraft", @{thm Moment_Querkraft})
|
neuper@55425
|
91 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
92 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("Neigung_Moment", @{thm Neigung_Moment})
|
neuper@55425
|
93 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
94 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("Querkraft_Belastung", @{thm Querkraft_Belastung})
|
neuper@55425
|
95 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
96 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("Querkraft_Moment", @{thm Querkraft_Moment})
|
neuper@55425
|
97 |
["Walther Neuper 2005 supported by a grant from NMI Austria"],
|
walther@60253
|
98 |
Thy_Hierarchy.make_thm @{theory} "IsacKnowledge" ("make_fun_explicit", @{thm make_fun_explicit})
|
neuper@55425
|
99 |
["Walther Neuper 2005 supported by a grant from NMI Austria"]]
|
wneuper@59472
|
100 |
\<close>
|
walther@60255
|
101 |
( **)
|
neuper@37954
|
102 |
|
walther@60023
|
103 |
section \<open>Problems\<close>
|
walther@60023
|
104 |
|
wenzelm@60306
|
105 |
problem pbl_bieg : "Biegelinien" =
|
wenzelm@60306
|
106 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
107 |
Method: "IntegrierenUndKonstanteBestimmen2"
|
wenzelm@60306
|
108 |
Given: "Traegerlaenge l_l" "Streckenlast q_q"
|
wenzelm@60306
|
109 |
(* Where: "0 < l_l" ...wait for < and handling Arbfix*)
|
wenzelm@60306
|
110 |
Find: "Biegelinie b_b"
|
wenzelm@60306
|
111 |
Relate: "Randbedingungen r_b"
|
wenzelm@60306
|
112 |
|
wenzelm@60306
|
113 |
problem pbl_bieg_mom : "MomentBestimmte/Biegelinien" =
|
wenzelm@60306
|
114 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
115 |
Method: "IntegrierenUndKonstanteBestimmen"
|
wenzelm@60306
|
116 |
Given: "Traegerlaenge l_l" "Streckenlast q_q"
|
wenzelm@60306
|
117 |
(* Where: "0 < l_l" ...wait for < and handling Arbfix*)
|
wenzelm@60306
|
118 |
Find: "Biegelinie b_b"
|
wenzelm@60306
|
119 |
Relate: "RandbedingungenBiegung r_b" "RandbedingungenMoment r_m"
|
wenzelm@60306
|
120 |
|
wenzelm@60306
|
121 |
problem pbl_bieg_momg : "MomentGegebene/Biegelinien" =
|
wenzelm@60306
|
122 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
123 |
Method: "IntegrierenUndKonstanteBestimmen/2xIntegrieren"
|
wenzelm@60306
|
124 |
|
wenzelm@60306
|
125 |
problem pbl_bieg_einf : "einfache/Biegelinien" =
|
wenzelm@60306
|
126 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
127 |
Method: "IntegrierenUndKonstanteBestimmen/4x4System"
|
wenzelm@60306
|
128 |
|
wenzelm@60306
|
129 |
problem pbl_bieg_momquer : "QuerkraftUndMomentBestimmte/Biegelinien" =
|
wenzelm@60306
|
130 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
131 |
Method: "IntegrierenUndKonstanteBestimmen/1xIntegrieren"
|
wenzelm@60306
|
132 |
|
wenzelm@60306
|
133 |
problem pbl_bieg_vonq : "vonBelastungZu/Biegelinien" =
|
wenzelm@60306
|
134 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
135 |
Method: "Biegelinien/ausBelastung"
|
wenzelm@60306
|
136 |
Given: "Streckenlast q_q" "FunktionsVariable v_v"
|
wenzelm@60306
|
137 |
Find: "Funktionen funs'''"
|
wenzelm@60306
|
138 |
|
wenzelm@60306
|
139 |
problem pbl_bieg_randbed : "setzeRandbedingungen/Biegelinien" =
|
wenzelm@60306
|
140 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
141 |
Method: "Biegelinien/setzeRandbedingungenEin"
|
wenzelm@60306
|
142 |
Given: "Funktionen fun_s" "Randbedingungen r_b"
|
wenzelm@60306
|
143 |
Find: "Gleichungen equs'''"
|
wenzelm@60306
|
144 |
|
wenzelm@60306
|
145 |
problem pbl_equ_fromfun : "makeFunctionTo/equation" =
|
wenzelm@60306
|
146 |
\<open>Rule_Set.append_rules "empty" Rule_Set.empty []\<close>
|
wenzelm@60306
|
147 |
Method: "Equation/fromFunction"
|
wenzelm@60306
|
148 |
Given: "functionEq fu_n" "substitution su_b"
|
wenzelm@60306
|
149 |
Find: "equality equ'''"
|
wenzelm@60306
|
150 |
|
wneuper@59472
|
151 |
ML \<open>
|
neuper@37954
|
152 |
(** methods **)
|
neuper@37954
|
153 |
|
walther@59851
|
154 |
val srls = Rule_Def.Repeat {id="srls_IntegrierenUnd..",
|
neuper@37954
|
155 |
preconds = [],
|
neuper@37954
|
156 |
rew_ord = ("termlessI",termlessI),
|
walther@59852
|
157 |
erls = Rule_Set.append_rules "erls_in_srls_IntegrierenUnd.." Rule_Set.empty
|
neuper@37999
|
158 |
[(*for asm in NTH_CONS ...*)
|
wenzelm@60294
|
159 |
\<^rule_eval>\<open>less\<close> (Prog_Expr.eval_equ "#less_"),
|
neuper@37999
|
160 |
(*2nd NTH_CONS pushes n+-1 into asms*)
|
wenzelm@60294
|
161 |
\<^rule_eval>\<open>plus\<close> (**)(eval_binop "#add_")
|
neuper@37954
|
162 |
],
|
walther@59851
|
163 |
srls = Rule_Set.Empty, calc = [], errpatts = [],
|
wenzelm@60297
|
164 |
rules = [\<^rule_thm>\<open>NTH_CONS\<close>,
|
wenzelm@60294
|
165 |
\<^rule_eval>\<open>plus\<close> (**)(eval_binop "#add_"),
|
wenzelm@60297
|
166 |
\<^rule_thm>\<open>NTH_NIL\<close>,
|
wenzelm@60294
|
167 |
\<^rule_eval>\<open>Prog_Expr.lhs\<close> (Prog_Expr.eval_lhs"eval_lhs_"),
|
wenzelm@60294
|
168 |
\<^rule_eval>\<open>Prog_Expr.rhs\<close> (Prog_Expr.eval_rhs"eval_rhs_"),
|
wenzelm@60294
|
169 |
\<^rule_eval>\<open>Prog_Expr.argument_in\<close> (Prog_Expr.eval_argument_in "Prog_Expr.argument_in")
|
neuper@37954
|
170 |
],
|
walther@59878
|
171 |
scr = Rule.Empty_Prog};
|
neuper@37954
|
172 |
|
neuper@37954
|
173 |
val srls2 =
|
walther@59851
|
174 |
Rule_Def.Repeat {id="srls_IntegrierenUnd..",
|
neuper@37954
|
175 |
preconds = [],
|
neuper@37954
|
176 |
rew_ord = ("termlessI",termlessI),
|
walther@59852
|
177 |
erls = Rule_Set.append_rules "erls_in_srls_IntegrierenUnd.." Rule_Set.empty
|
neuper@37999
|
178 |
[(*for asm in NTH_CONS ...*)
|
wenzelm@60294
|
179 |
\<^rule_eval>\<open>less\<close> (Prog_Expr.eval_equ "#less_"),
|
neuper@37999
|
180 |
(*2nd NTH_CONS pushes n+-1 into asms*)
|
wenzelm@60294
|
181 |
\<^rule_eval>\<open>plus\<close> (**)(eval_binop "#add_")
|
neuper@37954
|
182 |
],
|
walther@59851
|
183 |
srls = Rule_Set.Empty, calc = [], errpatts = [],
|
wenzelm@60297
|
184 |
rules = [\<^rule_thm>\<open>NTH_CONS\<close>,
|
wenzelm@60294
|
185 |
\<^rule_eval>\<open>plus\<close> (**)(eval_binop "#add_"),
|
wenzelm@60297
|
186 |
\<^rule_thm>\<open>NTH_NIL\<close>,
|
wenzelm@60294
|
187 |
\<^rule_eval>\<open>Prog_Expr.lhs\<close> (Prog_Expr.eval_lhs "eval_lhs_"),
|
wenzelm@60294
|
188 |
\<^rule_eval>\<open>Prog_Expr.filter_sameFunId\<close> (Prog_Expr.eval_filter_sameFunId "Prog_Expr.filter_sameFunId"),
|
neuper@37954
|
189 |
(*WN070514 just for smltest/../biegelinie.sml ...*)
|
wenzelm@60294
|
190 |
\<^rule_eval>\<open>Prog_Expr.sameFunId\<close> (Prog_Expr.eval_sameFunId "Prog_Expr.sameFunId"),
|
wenzelm@60297
|
191 |
\<^rule_thm>\<open>filter_Cons\<close>,
|
wenzelm@60297
|
192 |
\<^rule_thm>\<open>filter_Nil\<close>,
|
wenzelm@60297
|
193 |
\<^rule_thm>\<open>if_True\<close>,
|
wenzelm@60297
|
194 |
\<^rule_thm>\<open>if_False\<close>,
|
wenzelm@60297
|
195 |
\<^rule_thm>\<open>hd_thm\<close>
|
neuper@37954
|
196 |
],
|
walther@59878
|
197 |
scr = Rule.Empty_Prog};
|
wneuper@59472
|
198 |
\<close>
|
neuper@37999
|
199 |
|
wneuper@59429
|
200 |
section \<open>Methods\<close>
|
wneuper@59506
|
201 |
(* setup parent directory *)
|
wenzelm@60303
|
202 |
method met_biege : "IntegrierenUndKonstanteBestimmen" =
|
wenzelm@60303
|
203 |
\<open>{rew_ord'="tless_true", rls'= Rule_Set.Empty, calc = [], srls = Rule_Set.Empty, prls = Rule_Set.Empty, crls =Rule_Set.Empty,
|
wenzelm@60303
|
204 |
errpats = [], nrls = Rule_Set.Empty}\<close>
|
wneuper@59545
|
205 |
|
walther@60023
|
206 |
subsection \<open>Survey on Methods\<close>
|
walther@60023
|
207 |
text \<open>
|
walther@60023
|
208 |
Theory "Biegelinie" used by all Subproblems
|
walther@60023
|
209 |
v-- the root Problem calling SubProblems according to indentation
|
walther@60023
|
210 |
|
walther@60023
|
211 |
Problem ["Biegelinien"]
|
walther@60154
|
212 |
MethodC ["IntegrierenUndKonstanteBestimmen2"] biegelinie
|
walther@60023
|
213 |
|
walther@60023
|
214 |
Problem ["vonBelastungZu", "Biegelinien"]
|
walther@60154
|
215 |
MethodC ["Biegelinien", "ausBelastung"] belastung_zu_biegelinie
|
walther@60023
|
216 |
|
walther@60023
|
217 |
Problem ["named", "integrate", "function"]
|
walther@60154
|
218 |
MethodC ["diff", "integration", "named"]
|
walther@60023
|
219 |
|
walther@60023
|
220 |
-"- 4 times
|
walther@60023
|
221 |
|
walther@60023
|
222 |
Problem ["setzeRandbedingungen", "Biegelinien"]
|
walther@60154
|
223 |
MethodC ["Biegelinien", "setzeRandbedingungenEin"] setzte_randbedingungen
|
walther@60023
|
224 |
|
walther@60023
|
225 |
Problem ["makeFunctionTo", "equation"]
|
walther@60154
|
226 |
MethodC ["Equation", "fromFunction"]
|
walther@60023
|
227 |
|
walther@60023
|
228 |
-"- 4 times
|
walther@60023
|
229 |
|
walther@60023
|
230 |
Problem ["LINEAR", "system"]
|
walther@60154
|
231 |
MethodC ["no_met"]
|
walther@60023
|
232 |
^^^^^^--- thus automatied refinement to appropriate Problem
|
walther@60023
|
233 |
\<close>
|
walther@60023
|
234 |
|
walther@60023
|
235 |
subsection \<open>Compute the general bending line\<close>
|
walther@60023
|
236 |
(* Traegerlaenge beam Biegelinie!TYPE! id_fun AbleitungBiegelinie id_der
|
walther@60023
|
237 |
Streckenlast load Randbedingungen side_conds Biegelinie \<noteq>!TYPE!
|
walther@60023
|
238 |
FunktionsVariable fun_var GleichungsVariablen vs *)
|
wneuper@59549
|
239 |
partial_function (tailrec) biegelinie ::
|
wneuper@59549
|
240 |
"real \<Rightarrow> real \<Rightarrow> real \<Rightarrow> (real \<Rightarrow> real) \<Rightarrow> bool list \<Rightarrow> real list \<Rightarrow> (real \<Rightarrow> real) \<Rightarrow> bool"
|
wneuper@59504
|
241 |
where
|
walther@60023
|
242 |
"biegelinie beam load fun_var id_fun side_conds vs id_der = (
|
walther@59635
|
243 |
let
|
wneuper@59504
|
244 |
funs = SubProblem (''Biegelinie'', [''vonBelastungZu'', ''Biegelinien''],
|
walther@60023
|
245 |
[''Biegelinien'', ''ausBelastung''])
|
walther@60023
|
246 |
[REAL load, REAL fun_var, REAL_REAL id_fun, REAL_REAL id_der];
|
wneuper@59504
|
247 |
equs = SubProblem (''Biegelinie'', [''setzeRandbedingungen'', ''Biegelinien''],
|
walther@60023
|
248 |
[''Biegelinien'', ''setzeRandbedingungenEin'']) [BOOL_LIST funs, BOOL_LIST side_conds];
|
walther@59635
|
249 |
cons = SubProblem (''Biegelinie'', [''LINEAR'', ''system''],
|
walther@59635
|
250 |
[''no_met'']) [BOOL_LIST equs, REAL_LIST vs];
|
wneuper@59504
|
251 |
B = Take (lastI funs);
|
walther@60023
|
252 |
B = ((Substitute cons) #> (Rewrite_Set_Inst [(''bdv'', fun_var)] ''make_ratpoly_in'')) B
|
wneuper@59504
|
253 |
in B)"
|
wenzelm@60303
|
254 |
|
wenzelm@60303
|
255 |
method met_biege_2 : "IntegrierenUndKonstanteBestimmen2" =
|
wenzelm@60303
|
256 |
\<open>{rew_ord'="tless_true",
|
wenzelm@60303
|
257 |
rls' = Rule_Set.append_rules "erls_IntegrierenUndK.." Rule_Set.empty
|
wenzelm@60303
|
258 |
[\<^rule_eval>\<open>Prog_Expr.ident\<close> (Prog_Expr.eval_ident "#ident_"),
|
wenzelm@60303
|
259 |
\<^rule_thm>\<open>not_true\<close>,
|
wenzelm@60303
|
260 |
\<^rule_thm>\<open>not_false\<close>],
|
wenzelm@60303
|
261 |
calc = [],
|
wenzelm@60303
|
262 |
srls = Rule_Set.append_rules "erls_IntegrierenUndK.." Rule_Set.empty
|
wenzelm@60303
|
263 |
[\<^rule_eval>\<open>Prog_Expr.rhs\<close> (Prog_Expr.eval_rhs"eval_rhs_"),
|
wenzelm@60303
|
264 |
\<^rule_eval>\<open>Prog_Expr.ident\<close> (Prog_Expr.eval_ident "#ident_"),
|
wenzelm@60303
|
265 |
\<^rule_thm>\<open>last_thmI\<close>,
|
wenzelm@60303
|
266 |
\<^rule_thm>\<open>if_True\<close>,
|
wenzelm@60303
|
267 |
\<^rule_thm>\<open>if_False\<close>],
|
wenzelm@60303
|
268 |
prls = Rule_Set.Empty, crls = Atools_erls, errpats = [], nrls = Rule_Set.Empty}\<close>
|
wenzelm@60303
|
269 |
Program: biegelinie.simps
|
wenzelm@60303
|
270 |
Given: "Traegerlaenge beam" "Streckenlast load"
|
wenzelm@60303
|
271 |
"FunktionsVariable fun_var" "GleichungsVariablen vs" "AbleitungBiegelinie id_der"
|
wenzelm@60303
|
272 |
(* Where: "0 < beam" ...wait for < and handling Arbfix*)
|
wenzelm@60303
|
273 |
Find: "Biegelinie id_fun"
|
wenzelm@60303
|
274 |
Relate: "Randbedingungen side_conds"
|
wenzelm@60303
|
275 |
|
wenzelm@60303
|
276 |
method met_biege_intconst_2 : "IntegrierenUndKonstanteBestimmen/2xIntegrieren" =
|
wenzelm@60303
|
277 |
\<open>{rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
|
wenzelm@60303
|
278 |
errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
279 |
|
wenzelm@60303
|
280 |
method met_biege_intconst_4 : "IntegrierenUndKonstanteBestimmen/4x4System" =
|
wenzelm@60303
|
281 |
\<open>{rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
|
wenzelm@60303
|
282 |
errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
283 |
|
wenzelm@60303
|
284 |
method met_biege_intconst_1 : "IntegrierenUndKonstanteBestimmen/1xIntegrieren" =
|
wenzelm@60303
|
285 |
\<open>{rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
|
wenzelm@60303
|
286 |
errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
287 |
|
wenzelm@60303
|
288 |
method met_biege2 : "Biegelinien" =
|
wenzelm@60303
|
289 |
\<open>{rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = Rule_Set.empty, prls=Rule_Set.empty, crls = Atools_erls,
|
wenzelm@60303
|
290 |
errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
291 |
|
wenzelm@60303
|
292 |
|
walther@60023
|
293 |
subsection \<open>Sub-problem "integrate and determine constants", nicely modularised\<close>
|
wneuper@59429
|
294 |
|
walther@59998
|
295 |
partial_function (tailrec) belastung_zu_biegelinie ::
|
walther@59998
|
296 |
(* Streckenlast Biegelinie Funktionen
|
walther@59998
|
297 |
FunktionsVariable AbleitungBiegelinie *)
|
walther@59998
|
298 |
"real \<Rightarrow> real \<Rightarrow> (real \<Rightarrow> real) \<Rightarrow> (real \<Rightarrow> real) \<Rightarrow> bool list"
|
wneuper@59504
|
299 |
where
|
walther@60023
|
300 |
"belastung_zu_biegelinie q__q v_v id_fun id_der = (
|
walther@59635
|
301 |
let
|
walther@59635
|
302 |
q___q = Take (qq v_v = q__q);
|
walther@59635
|
303 |
q___q = (
|
walther@59637
|
304 |
(Rewrite ''sym_neg_equal_iff_equal'') #>
|
walther@59635
|
305 |
(Rewrite ''Belastung_Querkraft'')) q___q;
|
walther@59635
|
306 |
Q__Q = SubProblem (''Biegelinie'', [''named'', ''integrate'', ''function''],
|
walther@59635
|
307 |
[''diff'', ''integration'', ''named'']) [REAL (rhs q___q), REAL v_v, REAL_REAL Q];
|
walther@59635
|
308 |
M__M = Rewrite ''Querkraft_Moment'' Q__Q;
|
walther@59635
|
309 |
M__M = SubProblem (''Biegelinie'', [''named'', ''integrate'', ''function''],
|
walther@59635
|
310 |
[''diff'', ''integration'', ''named'']) [REAL (rhs M__M), REAL v_v, REAL_REAL M_b];
|
walther@59635
|
311 |
N__N = (
|
walther@59637
|
312 |
(Rewrite ''Moment_Neigung'' ) #> (Rewrite ''make_fun_explicit'' )) M__M;
|
walther@59635
|
313 |
N__N = SubProblem (''Biegelinie'', [''named'', ''integrate'', ''function''],
|
walther@60023
|
314 |
[''diff'', ''integration'', ''named'']) [REAL (rhs N__N), REAL v_v, REAL_REAL id_der];
|
walther@59635
|
315 |
B__B = SubProblem (''Biegelinie'', [''named'', ''integrate'', ''function''],
|
walther@59635
|
316 |
[''diff'', ''integration'', ''named'']) [REAL (rhs N__N), REAL v_v, REAL_REAL id_fun]
|
walther@59635
|
317 |
in
|
walther@59998
|
318 |
[Q__Q, M__M, N__N, B__B])" (*..Q is Const Querkraft -------------------------^ *)
|
wenzelm@60303
|
319 |
|
wenzelm@60303
|
320 |
method met_biege_ausbelast : "Biegelinien/ausBelastung" =
|
wenzelm@60303
|
321 |
\<open>{rew_ord'="tless_true",
|
wenzelm@60303
|
322 |
rls' = Rule_Set.append_rules "erls_ausBelastung" Rule_Set.empty
|
wenzelm@60303
|
323 |
[\<^rule_eval>\<open>Prog_Expr.ident\<close> (Prog_Expr.eval_ident "#ident_"),
|
wenzelm@60303
|
324 |
\<^rule_thm>\<open>not_true\<close>,
|
wenzelm@60303
|
325 |
\<^rule_thm>\<open>not_false\<close>],
|
wenzelm@60303
|
326 |
calc = [],
|
wenzelm@60303
|
327 |
srls = Rule_Set.append_rules "srls_ausBelastung" Rule_Set.empty
|
wenzelm@60303
|
328 |
[\<^rule_eval>\<open>Prog_Expr.rhs\<close> (Prog_Expr.eval_rhs "eval_rhs_")],
|
wenzelm@60303
|
329 |
prls = Rule_Set.empty, crls = Atools_erls, errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
330 |
Program: belastung_zu_biegelinie.simps
|
wenzelm@60303
|
331 |
Given: "Streckenlast q__q" "FunktionsVariable v_v" "Biegelinie id_fun" "AbleitungBiegelinie id_der"
|
wenzelm@60303
|
332 |
Find: "Funktionen fun_s"
|
wenzelm@60303
|
333 |
|
wneuper@59429
|
334 |
subsection \<open>Substitute the constraints into the equations\<close>
|
wneuper@59429
|
335 |
|
wneuper@59504
|
336 |
partial_function (tailrec) setzte_randbedingungen :: "bool list \<Rightarrow> bool list \<Rightarrow> bool list"
|
wneuper@59504
|
337 |
where
|
walther@59635
|
338 |
"setzte_randbedingungen fun_s r_b = (
|
walther@59635
|
339 |
let
|
walther@59635
|
340 |
b_1 = NTH 1 r_b;
|
walther@59635
|
341 |
f_s = filter_sameFunId (lhs b_1) fun_s;
|
walther@59635
|
342 |
e_1 = SubProblem (''Biegelinie'', [''makeFunctionTo'', ''equation''],
|
walther@59635
|
343 |
[''Equation'', ''fromFunction'']) [BOOL (hd f_s), BOOL b_1];
|
walther@59635
|
344 |
b_2 = NTH 2 r_b;
|
walther@59635
|
345 |
f_s = filter_sameFunId (lhs b_2) fun_s;
|
walther@59635
|
346 |
e_2 = SubProblem (''Biegelinie'', [''makeFunctionTo'', ''equation''],
|
walther@59635
|
347 |
[''Equation'', ''fromFunction'']) [BOOL (hd f_s), BOOL b_2];
|
walther@59635
|
348 |
b_3 = NTH 3 r_b;
|
walther@59635
|
349 |
f_s = filter_sameFunId (lhs b_3) fun_s;
|
walther@59635
|
350 |
e_3 = SubProblem (''Biegelinie'', [''makeFunctionTo'', ''equation''],
|
walther@59635
|
351 |
[''Equation'', ''fromFunction'']) [BOOL (hd f_s), BOOL b_3];
|
walther@59635
|
352 |
b_4 = NTH 4 r_b;
|
walther@59635
|
353 |
f_s = filter_sameFunId (lhs b_4) fun_s;
|
walther@59635
|
354 |
e_4 = SubProblem (''Biegelinie'', [''makeFunctionTo'', ''equation''],
|
walther@59635
|
355 |
[''Equation'', ''fromFunction'']) [BOOL (hd f_s), BOOL b_4]
|
walther@59635
|
356 |
in
|
walther@59635
|
357 |
[e_1, e_2, e_3, e_4])"
|
wenzelm@60303
|
358 |
|
wenzelm@60303
|
359 |
method met_biege_setzrand : "Biegelinien/setzeRandbedingungenEin" =
|
wenzelm@60303
|
360 |
\<open>{rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [], srls = srls2, prls=Rule_Set.empty, crls = Atools_erls,
|
wenzelm@60303
|
361 |
errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
362 |
Program: setzte_randbedingungen.simps
|
wenzelm@60303
|
363 |
Given: "Funktionen fun_s" "Randbedingungen r_b"
|
wenzelm@60303
|
364 |
Find: "Gleichungen equs'''"
|
wenzelm@60303
|
365 |
|
wenzelm@60303
|
366 |
|
wneuper@59429
|
367 |
subsection \<open>Transform an equality into a function\<close>
|
wneuper@59429
|
368 |
|
walther@60242
|
369 |
(*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2) (M_b L = 0) -->
|
walther@60242
|
370 |
0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2*)
|
wneuper@59504
|
371 |
partial_function (tailrec) function_to_equality :: "bool \<Rightarrow> bool \<Rightarrow> bool"
|
wneuper@59504
|
372 |
where
|
walther@59635
|
373 |
"function_to_equality fu_n su_b = (
|
walther@59635
|
374 |
let
|
walther@59635
|
375 |
fu_n = Take fu_n;
|
walther@59635
|
376 |
bd_v = argument_in (lhs fu_n);
|
walther@59635
|
377 |
va_l = argument_in (lhs su_b);
|
walther@60242
|
378 |
eq_u = Substitute [bd_v = va_l] fu_n; \<comment> \<open>([1], Res), M_b L = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2\<close>
|
walther@59635
|
379 |
eq_u = Substitute [su_b] eq_u
|
walther@59635
|
380 |
in
|
walther@59635
|
381 |
(Rewrite_Set ''norm_Rational'') eq_u)"
|
wenzelm@60303
|
382 |
|
wenzelm@60303
|
383 |
method met_equ_fromfun : "Equation/fromFunction" =
|
wenzelm@60303
|
384 |
\<open>{rew_ord'="tless_true", rls'=Rule_Set.Empty, calc = [],
|
wenzelm@60303
|
385 |
srls = Rule_Set.append_rules "srls_in_EquationfromFunc" Rule_Set.empty
|
wenzelm@60303
|
386 |
[\<^rule_eval>\<open>Prog_Expr.lhs\<close> (Prog_Expr.eval_lhs "eval_lhs_"),
|
wenzelm@60303
|
387 |
\<^rule_eval>\<open>Prog_Expr.argument_in\<close> (Prog_Expr.eval_argument_in "Prog_Expr.argument_in")],
|
wenzelm@60303
|
388 |
prls=Rule_Set.empty, crls = Atools_erls, errpats = [], nrls = Rule_Set.empty}\<close>
|
wenzelm@60303
|
389 |
Program: function_to_equality.simps
|
wenzelm@60303
|
390 |
(*(M_b x = c_2 + c * x + -1 * q_0 / 2 * x \<up> 2) (M_b L = 0) -->
|
wenzelm@60303
|
391 |
0 = c_2 + c * L + -1 * q_0 / 2 * L \<up> 2*)
|
wenzelm@60303
|
392 |
Given: "functionEq fu_n" "substitution su_b"
|
wenzelm@60303
|
393 |
Find: "equality equ'''"
|
wenzelm@60303
|
394 |
|
wneuper@59549
|
395 |
ML \<open>
|
wneuper@59549
|
396 |
\<close> ML \<open>
|
walther@60278
|
397 |
\<close> ML \<open>
|
wneuper@59549
|
398 |
\<close>
|
neuper@37906
|
399 |
end
|
neuper@37906
|
400 |
|