How to optimize and reduce calculation time for a column under biaxial moments and axial load?

How to optimize and reduce calculation time for a column under biaxial moments and axial load? - Messages

#1 Posted: 10/13/2026 5:59:58 PM
hamze

hamze

0 likes in 5 posts.

Group: User

عزمين.sm (61.11 KiB) downloaded 21 time(s).image_2026-10-13_205605381.pngHello everyone,

I am working on an SMath Studio worksheet to analyze a structural column subjected to biaxial moments and an axial load.

Currently, the calculation takes approximately 30 minutes to complete. I suspect the long duration is due to how the solution is structured (e.g., iterative loops, large matrices, or inefficient solving blocks).

I am looking for ways to significantly reduce this calculation time. Could you please advise on the following:

1. Optimization Techniques: Are there specific SMath Studio functions or programming practices (like using vectors/matrices instead of loops, or optimizing solve blocks) that can speed up the process?
2. Solver Settings: Are there settings within the solve or roots functions (like tolerance or guess values) that, if adjusted, could lead to faster convergence?
3. Structural Approach: Is there a more efficient mathematical approach to handle biaxial bending and axial loads (e.g., using interaction diagrams or simplifying assumptions) that reduces computational load?
4. Hardware/Software: Would using a different SMath version or adjusting memory allocation help in this case?

I have attached the SMath file (bUR7Y) for your reference. Any advice or best practices would be greatly appreciated.

Thank you in advance for your help.P,Mx,My.sm (58.48 KiB) downloaded 26 time(s).
Edited 10/14/2026 9:06:16 AM
#2 Posted: 10/14/2026 7:20:30 AM
StvMath

StvMath

44 likes and 1 dislikes in 75 posts.

Group: User

You forgot to post the file.
#3 Posted: 10/14/2026 9:12:05 AM
hamze

hamze

0 likes in 5 posts.

Group: User

I have uploaded the file
#4 Posted: 10/14/2026 11:14:23 AM
StvMath

StvMath

44 likes and 1 dislikes in 75 posts.

Group: User

You have a number of problems:

1. f'c is undefined.

2. Phi_tie needs to be a function of phi: Phi_tie(phi) = etc.

3. You can't use text and numbers together in numerical calculations. For example, when calling Phi you need subscripts to represent the row and 2nd column to extract the numerical value.

4. In your functions Mcap etc you should pass them a specific value of phi (and then same for any other vectors) rather than the whole vector.

Fix the above and see if there's any improvement.
#5 Posted: 10/14/2026 3:04:16 PM
hamze

hamze

0 likes in 5 posts.

Group: User

All symbols have a numerical definition located at the top of the page in the closed area. The program works but takes a very long time to solve the problem. Here, the issue is with the time duration, not with the symbols.
#6 Posted: 10/14/2026 4:43:04 PM
StvMath

StvMath

44 likes and 1 dislikes in 75 posts.

Group: User

You had uploaded two files. My comments related to file: P,Mx,My.sm. I see that the other file is different! I'll have a look at that tomorrow.
#7 Posted: 10/15/2026 12:45:37 PM
StvMath

StvMath

44 likes and 1 dislikes in 75 posts.

Group: User

I've had a quick look at your other file.

1. It only takes a couple of minutes on my laptop (which is far from a top of the range computer).

2. I notice that if you reduce the value of N (in routine Mcap) to 10 rather than 100, you get the same result (at least, for the default values of phi etc), and it runs quicker.
AS2.png" border="0" />


3. The following is a little more efficient at the end.
AS1.png
#8 Posted: 10/15/2026 2:07:37 PM
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 likes in 181 posts.

Group: User

Greetings,

For what it is worth, I have these notes written down:

First Three Steps For Runtime Optimization:
  1. Optimization of region --> Manually declare 'numerical' evaluation instead of Symbolic (factor of x2) or None (factor of x25)
  2. Use vectorize() when possible possible (x2 to x10 faster than loops)
  3. Use eval() in iterative calculation (basically for those for loops) - 「Razonar」


- Thrown Errors will Double Runtime

May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
Edited 10/15/2026 2:07:55 PM
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#9 Posted: 10/15/2026 2:59:46 PM
hamze

hamze

0 likes in 5 posts.

Group: User

P,Mx,My.sm (72.32 KiB) downloaded 9 time(s).thinks (I only know about the problem in terms of mechanics of materials, its properties, and loads. I can initially assume preliminary cross-section dimensions, determine the reinforcement diameter, and then rely on the function to calculate the rest. I have a file that works manually, in the sense that I provide all the input data myself. I will upload it along with the file that has the problem),(I will upload the two files, and you should review them and suggest modifications to the file that has the problem.)
Edited 10/15/2026 3:04:12 PM
#10 Posted: 10/15/2026 4:23:19 PM
hamze

hamze

0 likes in 5 posts.

Group: User

Wrote

I've had a quick look at your other file.

1. It only takes a couple of minutes on my laptop (which is far from a top of the range computer).

2. I notice that if you reduce the value of N (in routine Mcap) to 10 rather than 100, you get the same result (at least, for the default values of phi etc), and it runs quicker.
AS2.png" border="0" />


3. The following is a little more efficient at the end.
AS1.png

change the input data (h = 50 cm, b = 50 cm) at the beginning of the page so that he can discover problem
  • New Posts
  • No New Posts