1 Pages (15 items)
Solving a set of equations with function implemented in another - Messages
#1 Posted: 2/24/2017 4:13:17 PM
Hello,
I have an equation, which depends on two other function, which depends on one variable. How can I solve it?
Look at the attached file. smath forum.sm (96 KiB) downloaded 49 time(s).
In general, I have set of two equations:
Fs=Nc(x)
and Fs*(d-x_compression)+Nc(x)*x_b*x_compression=M_Ed
Now, I implemented all funcitons as function of x (x stays for Ec - strain in concrete), but I can easily manipulate compression zone (x_compression) if necessary, as it is also not given as "constant".
At the beginning I define dimensions (b,h,a1) and material (fck, gamma_c, alfa_cc). I also assume compression zone and strain in concrete and I have bending moment M_Ed. Rest (and also x_compression and E_c) are editable/may change and depend on each other.
Could you please tell me what's the easiest way to solve those two equations?
Unfortunatelly, when I am trying to solve(Nc(x)=Fs,x)=0, SMath respond is that x has not been defined.
Any ideas?
BR.
I have an equation, which depends on two other function, which depends on one variable. How can I solve it?
Look at the attached file. smath forum.sm (96 KiB) downloaded 49 time(s).
In general, I have set of two equations:
Fs=Nc(x)
and Fs*(d-x_compression)+Nc(x)*x_b*x_compression=M_Ed
Now, I implemented all funcitons as function of x (x stays for Ec - strain in concrete), but I can easily manipulate compression zone (x_compression) if necessary, as it is also not given as "constant".
At the beginning I define dimensions (b,h,a1) and material (fck, gamma_c, alfa_cc). I also assume compression zone and strain in concrete and I have bending moment M_Ed. Rest (and also x_compression and E_c) are editable/may change and depend on each other.
Could you please tell me what's the easiest way to solve those two equations?
Unfortunatelly, when I am trying to solve(Nc(x)=Fs,x)=0, SMath respond is that x has not been defined.
Any ideas?
BR.
#2 Posted: 2/24/2017 4:20:44 PM
For the needs of solving, you may assume that:
BR
- x_compression is given and constant (probably best for now)
- x_compression is variable (but I should probably do it another way)
BR
#3 Posted: 2/24/2017 6:22:36 PM
As it looks, units is the problem .
Some remarks at the end.
Jean
smath forum.sm (104 KiB) downloaded 46 time(s).
Some remarks at the end.
Jean
smath forum.sm (104 KiB) downloaded 46 time(s).
#4 Posted: 2/24/2017 6:54:14 PM
Jean,
thanks for your effort.
You have written:
"nothing to solve as you have two numbers" - not exactly, once you will look into the sum of steel and concrete you may see there Nc(Ec) - Ec is variable.
"f(x) must be a function" - isn't f(x)=123 a function? Still, I don't have any results. I would like to know at what argument Nc(x) is equal to Fs (Nc(x)=16.37, as then I may estimate strains in concrete. I don't know maybe you see a result? I have attached photo.
In the meantime I have prepared another set of equation for which I would need to have similiar solution as for that one above.
Could you take one more look at it?
BR.
thanks for your effort.
You have written:
"nothing to solve as you have two numbers" - not exactly, once you will look into the sum of steel and concrete you may see there Nc(Ec) - Ec is variable.
"f(x) must be a function" - isn't f(x)=123 a function? Still, I don't have any results. I would like to know at what argument Nc(x) is equal to Fs (Nc(x)=16.37, as then I may estimate strains in concrete. I don't know maybe you see a result? I have attached photo.
In the meantime I have prepared another set of equation for which I would need to have similiar solution as for that one above.
Could you take one more look at it?
BR.
#5 Posted: 2/25/2017 11:19:08 AM
I have simplified the function definitions and the integrals and fixed the units.
Don't know if the result is correct/matches the expectation.

smath%20forum_Kr.sm (97 KiB) downloaded 49 time(s).
Don't know if the result is correct/matches the expectation.
smath%20forum_Kr.sm (97 KiB) downloaded 49 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Posted: 2/25/2017 1:16:48 PM
WroteCould you take one more look at it?
Yes, and the answer is that there is no automatic solution.
Why ? Because the base "concrete(x)" is not a function,
only a discontinuous function, incompatible to the solver(s).
Done manually at the end of the work sheet.
Maybe "Dichotomy" is suitable ?
Jean
smath forum.sm (112 KiB) downloaded 33 time(s).
#7 Posted: 2/25/2017 1:55:08 PM
... "Dichotomy" solves nicely !
Solves for 'x' in "concrete(x)" for any value(s) in MEd(x)
Is it done as expected ? Your stuff is not my cup of tea !
Jean
smath forum.sm (116 KiB) downloaded 52 time(s).
Solves for 'x' in "concrete(x)" for any value(s) in MEd(x)
Is it done as expected ? Your stuff is not my cup of tea !
Jean
smath forum.sm (116 KiB) downloaded 52 time(s).
#8 Posted: 3/2/2017 3:25:13 AM
Jean, mkraska,
many thanks for your effort.
I was pretty busy last few days and this is something I am working on aside of main job, let's say.
I will look at it by the end of the week and let you know if your solution is working.
BR.
many thanks for your effort.
I was pretty busy last few days and this is something I am working on aside of main job, let's say.
I will look at it by the end of the week and let you know if your solution is working.
BR.
#9 Posted: 3/3/2017 11:44:49 AM
Can we use Newton-Raphson method instead of Dichotomy for example?
#10 Posted: 3/4/2017 9:25:31 AM
WroteCan we use Newton-Raphson method instead of Dichotomy for example?
Answer is : NO
MED(x) is a constant , Newton-Raphson supports only functions
Dichotomy supports MED(x) defined as a constant, i.e: it
supports "fake function" as well as the 'solve block'
In your document, 'solve' fails because of the unit system.
Jean
#11 Posted: 3/4/2017 9:40:00 AM
... rootsecant fails as well.
#12 Posted: 3/4/2017 7:06:57 PM
WroteWrote
MED(x) is a constant , Newton-Raphson supports only function
Med(x) in future may be function, not only constant. Will dichtomy be enough then to solve it?
From what I understand N-R may be applicable then, also?
Could you give me mathematical definition of dichotomy (it would be best if you can demonstrate it on that particular example)?
Then, you have stated something in pink background at the end of document. Was it check? You have defined values Epsilon, a and b - and I would like to know why.
#13 Posted: 3/4/2017 10:28:44 PM
The RootSecant & NewtonRaphson both need true functions.
Differently, "Dichotomy" takes a constant defined as a fake function.
In dichotomy: epsilon is the test for the convergence towards the solution,
solution desired at "epsilon accuracy". The while loop keeps refining the
solution at each step... more in green.
Jean
smath forum.sm (132 KiB) downloaded 46 time(s).
Differently, "Dichotomy" takes a constant defined as a fake function.
In dichotomy: epsilon is the test for the convergence towards the solution,
solution desired at "epsilon accuracy". The while loop keeps refining the
solution at each step... more in green.
Jean
smath forum.sm (132 KiB) downloaded 46 time(s).
#14 Posted: 3/6/2017 3:15:58 PM
Jean,
thanks again.
I have worked with this tool a bit today and yesterday and I made some changes. Right now I cannot get any results. I have added some picture and comments inside document. Also I have added values which shall be results for given data. Can you look at them?
I am looking for: strains at both edges, value of x_compression.
I have changed strain-stress function to be easier to verify results (once it will be ok, I will just change it into previous one).
BR.
Zadanie - dane sily - oblicz odksztalcenia.sm (766 KiB) downloaded 44 time(s). - problematic Smath document (given forces, and looking for strains and compression area)
Zadanie - dane odksztalcenia - oblicz x M i N.sm (52 KiB) downloaded 44 time(s). - the same problem, however solved with given strains (from them I've got compression area) and I was looking for forces.
Let me know in case of any questions to the idea itself.
thanks again.
I have worked with this tool a bit today and yesterday and I made some changes. Right now I cannot get any results. I have added some picture and comments inside document. Also I have added values which shall be results for given data. Can you look at them?
I am looking for: strains at both edges, value of x_compression.
I have changed strain-stress function to be easier to verify results (once it will be ok, I will just change it into previous one).
BR.
Zadanie - dane sily - oblicz odksztalcenia.sm (766 KiB) downloaded 44 time(s). - problematic Smath document (given forces, and looking for strains and compression area)
Zadanie - dane odksztalcenia - oblicz x M i N.sm (52 KiB) downloaded 44 time(s). - the same problem, however solved with given strains (from them I've got compression area) and I was looking for forces.
Let me know in case of any questions to the idea itself.
#15 Posted: 3/7/2017 3:40:42 AM
I have just one quick amendment, namely I am able to get proper strains in steel (εs(x)), as I know first value of force in bars N_s(x).
Then:
• σs(x)= εs(x)*E
• N_s(x)/As1= εs(x)*E
• εs(x)= N_s(x)/(As1*E)
Therefore value “y” from SMath document is known (however it depends on x). Still, I am looking for εc(x) (once I’ll have that value I will be able to get proper x_compression form Tales) or x_compression (once I’ll have that value I will be able to get proper εc(x)).
Note: values of strains (ε) and x_compression may vary, however for given set of N/M and geometric characteristics shall be equal to εs(x) = 0.3% and εc(x) = 0.15%.
Edit: See attached SMath file: I have added example.
Once I’ll finish it (with your help ) I will be interested in having all possible solutions, plotted on graph Moments/Normal forces in 2D.
Zadanie - dane sily - oblicz odksztalcenia.sm (770 KiB) downloaded 49 time(s).
1 Pages (15 items)
-
New Posts
-
No New Posts