Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Dear PTC Mathcad Community,
I want to ask for clarification on the behaviour of units and symbolic substitution in Mathcad Prime (similar topics have already been raised, but I still haven't found an appropriate answer for my issue).
So I try to find a symbolic expression for epsilon_c2, which is a parameter of the equation N.
Solver succeeded with the issue, but with incompatible units (see picture)
So, I have tried to find out the solution in the community, but the advice of @Werner_E with calculation options didn't resolve the issue (see the picture)
So my issues are:
1. How to make the symbolic solving more "seamless" with appropriate units' manipulation in the solutions?
2. Why does Mathcad not see the assigned values of the epsilon_c2 obtained in the previous solution?
After some time, when the file has been refreshed, some magic happened, and now I can use the roots of epsilon c1 and c2 in a "normal" manner.
But the next issue is that it doesn't let me substitute the obtained symbolic solution into the following step calculation for the moment M calculation.
As it can be seen, the factual equation is real, with proper units,
Nevertheless, Mathcad is still not satisfied with...
I am still convinced of Mathcad's power, but each time I get stuck with such a misunderstanding of Mathcad logic, I feel broken, exhausted and unable to continue to the next step - automation of my manual solution.
Any clarification, examples, or references to documentation would be greatly appreciated.
I am trying to align my workflow with my Mathcad Prime 10.0.0.0 internal logic rather than fight against it.
Thank you very much for your time and support.
The file with the manual calculation of M is attached.
Solved! Go to Solution.
The best way of using the symbolic solver is to use it with symbols only. That is:
- Do NOT use units.
- Do NOT use floating point numbers ( integers are OK, instead of 0.5 use 1/2, instead of 1.414... use √2 ).
It means that any variables you use in the symbolics are not assigned a (numeric) value.
To obtain numerical results, you best assign the result of the symbolics to a function of all required variables and call that function with the numeric values, including their units.
So instead of:
do:
Oh, and in case you are not interested in the symbolic solution, and you just want a numeric solution, then use a numeric solver (solve block, root() function or other suitable numeric function) instead of a symbolic one.
Success!
Luc
The best way of using the symbolic solver is to use it with symbols only. That is:
- Do NOT use units.
- Do NOT use floating point numbers ( integers are OK, instead of 0.5 use 1/2, instead of 1.414... use √2 ).
It means that any variables you use in the symbolics are not assigned a (numeric) value.
To obtain numerical results, you best assign the result of the symbolics to a function of all required variables and call that function with the numeric values, including their units.
So instead of:
do:
Oh, and in case you are not interested in the symbolic solution, and you just want a numeric solution, then use a numeric solver (solve block, root() function or other suitable numeric function) instead of a symbolic one.
Success!
Luc
Hi Ivan,
You have set out to produce a reinforced concrete section moment-curvature diagram.
Want to help you but things vary from country to country.
Going back to your last post you have the polynomial coefficients for the shape of the concrete stress-strain block.
Can you show me a plot of the stress-strain block using these polynomial coefficients and values of relevant strain points as this is one of the things that vary between countries.
The problem can be solved without symbolics but using parametrized solve blocks, and root functions.
Can you describe what the symbol gamma, and squiggly N are in equations 4.2.4? Draw a diagram.
Look forward to hearing back.
Cheers
Terry
Hi Terry!
Glad to see the community members are interested in resolving my issue.
@terryhendicott wrote:Hi Ivan,
You have set out to produce a reinforced concrete section moment-curvature diagram.
Want to help you but things vary from country to country.
Going back to your last post you have the polynomial coefficients for the shape of the concrete stress-strain block.
Can you show me a plot of the stress-strain block using these polynomial coefficients and values of relevant strain points as this is one of the things that vary between countries.
As you correctly mentioned, the moment-curvature "comprehensive" diagram could be represented by different equations:
1. Here, in our Code (Ukraine) two possible ways are possible (formula (3.4) or (3.5):
Where ak- polynomial coefficients (5), for each grade of concrete, is taken from Appendix D
The difference between the curves, realised by our Code and the formula, which is used in Europe, may be in the USA, if I'm not mistaken, is not significant. To prove this, I compared the two curves in Excel.
As you can see, both dependencies are pretty similar and close to each other.
...
The problem can be solved without symbolics but using parametrized solve blocks, and root functions.
I'd like to hear from you a simple example of how the ROOT function can be implemented here.
Thanks a lot for your interest in my topic.
Hi Ivan,
The stress strain curve is intrinsic to the calculation of the moment-curvature do you think you can give me the Excel sheet behind your graph so I fully understand both methods.
Cheers
Terry
Hi Terry,
The abovementioned graph shows only the concrete behaviour.
I guess it will be pretty helpful. Orange cells have a pop-up menu for convenience. Yellow cells are connected to formulae and shouldn't be changed.
@LucMeekes Thank you a lot, Luc. I'll consider it.
By the way, I got the result in my file.
The script works as it should.
Ready for the routine programming.
Hi Luc,
Maybe you can assist with my next question:
I guess that it is impossible for Mathcad, but I still ask:
Whether I want to obtain a symbolic result with a condition that contains the desired variable, can this be realised somehow in Prime?
It is crucial because if my symbolically derived value of epsilon_c2 leads the highlighted equation to a value greater than f_yd, it must be readjusted. ( I hope the SOLVE block will give me the chance to eliminate iterations with WHILE and FOR loops...😒
Sorry for annoying you. Knowing that I almost got to the point of resolving the issue, but embedding my condition in compliance with Mathcad syntax is hardcore...It really makes me crazy.
Maybe there are more tricky methods to get the correct value of epsilon_c2 that satisfies the condition???
Prime 10.0.0.0 file is attached.
The symbolic tries to evaluate the expression symbolically which means without knowing concrete values. Therefore branches and other conditions can't be evaluated.
The second argument ec2 in your function N() makes no sense as ec2 is the variable you are solving for.
Instead of your if..else.. you could use the "min" function, but this will not help with the symbolics.
I have not followed the complete thread and I have no expertise whatsoever in your field of work, but I wonder why you would use the symbolic solve.
You could use the root function. Your function N() seems to have a pole at ec2=ec1 (N-> inf) so I assume that you are looking for an ec2 > ec1.
One way to use the root function without a guess value would be that way:
Given your value of ec1 we get
I don't know what you intend to do with a function which returns ec2 depending on ec1 and I am not sure which values of ec1 you intend to feed into this function. I noticed that my attempt fails for values of ec1 larger than approx. 0.006393.
I have not investigated further, why, but it looks to me that there simply is no solution for larger value of ec1.
Prime 10 sheet attached
