1 страниц (10 вхождений)
How to optimize and reduce calculation time for a column under biaxial moments and axial load? - Сообщения
عزمين.sm (61,11 КиБ) скачан 22 раз(а).
Hello 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 КиБ) скачан 27 раз(а).
Hello 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 КиБ) скачан 27 раз(а).
Отредактировано 14.10.2026 09:06:16
You forgot to post the file.
I have uploaded the file
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.
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.
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.
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.
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.

" border="0" />
3. The following is a little more efficient at the end.

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.
" border="0" />3. The following is a little more efficient at the end.

Greetings,
For what it is worth, I have these notes written down:
First Three Steps For Runtime Optimization:
- Thrown Errors will Double Runtime
May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
For what it is worth, I have these notes written down:
First Three Steps For Runtime Optimization:
- Optimization of region --> Manually declare 'numerical' evaluation instead of Symbolic (factor of x2) or None (factor of x25)
- Use vectorize() when possible possible (x2 to x10 faster than loops)
- 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. ᵂᴵ
Отредактировано 15.10.2026 14:07:55
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
P,Mx,My.sm (72,32 КиБ) скачан 10 раз(а).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.)
Отредактировано 15.10.2026 15:04:12
change the input data (h = 50 cm, b = 50 cm) at the beginning of the page so that he can discover problemWroteI'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." border="0" />
3. The following is a little more efficient at the end.
1 страниц (10 вхождений)
- Новые сообщения
- Нет новых сообщений