SMath For Engineering Calculations

SMath For Engineering Calculations - How to create interconnected calculations - Messages

#61 Posted: 11/23/2014 9:25:53 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

BeamFEA updated:
  • unit support. You can specify units as factors for the modeler units. The preprocessor eliminates the units such that the solver input is unit-free. In the output the appropriate units are applied and can be modified as usual for display. Note that you can define separate units for length ('l.0)and displacement ('w.0).
  • separate diagrams for distributed load, transverse force, bending moment and displacement
  • input color scheme changed:
    • concentrated moment load and rotational constraint in red
    • concentrated forces and vertical supports in green
    The colors match the result curve, where the respective loads create steps.

Unit support was non-trivial. I failed to make the solver unit-proof because matrix inversion with units is not robust in SMath (probably due to poor pivot scaling in the algorithm).

Also, you easily can create programs which will crash SMath immediately after opening them (if auto-recalculate is on). I added this to SS-1227.

beamfea1.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
IVR 11/25/2014 3:09:00 PM
#62 Posted: 12/23/2014 2:34:37 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Martin,

Many beams designs are single ("simple" ) span beams. For improved efficiency, is it possible to set up an input base on matrices for a single span case similar to this:
Simple Input

I seem to be struggling to implement this into the BEAM FEA... not sure if you could lend a hand... sorry to be a bother.

#63 Posted: 12/23/2014 4:13:52 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Martin,

Many beams designs are single ("simple" ) span beams. For improved efficiency, is it possible to set up an input base on matrices for a single span case similar to this:
Simple Input

I seem to be struggling to implement this into the BEAM FEA... not sure if you could lend a hand... sorry to be a bother.


I see two options for integration with Beam FEA:
- either you generate a fake modeller output and feed that into the preprocessor
- or you write your own preprocessor and create the node and element matrices directly.
The same applies to the postprocessing. For modularity, I would recommend to write a separate postprocessing function working on the output of the solver.
Let me know what road you are going to go and what problems you face. Then I might be more specific.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#64 Posted: 12/23/2014 8:11:45 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

I was thinking that I would have a matrix for each loading option you have available in the modeller.
The loads from these matrix would be shown in the modeller. So I guess I'm not sure how to how to do that.
I suppose it does not have to be a simple span beam, but maybe there is a matrix where you list distance between supports (or absolute distance, either is fine).

Does this make sense or am I still too Vague?

I suppose one drawback to going this route could be that if I plan to use this on a page with many other variable there is risk of overwriting the variables defined in the "Templates area". Do you see issues with repeating beam fea on the page multiple times?
#65 Posted: 12/28/2014 7:14:40 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I think that one could create a function with local definition of templates, pre- and postprocessing, solving and modeler object generation. Then you would just call that function with whatever you define the input to be and get the required objects from the argument slots of the function. If these objects are properly initialized inside the function, then the same names can be used for each call.

Beam(Input, T, P, Out)
with
Input being a list of whatever matrices you want to use as input
T being the template list for the modeler
P being a matrix of predefined objects in the modeler
(both used to display the model and/or the solution)
Out is a list of whatever numeric results you want.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#66 Posted: 1/5/2015 8:31:20 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Martin I am trying to understand what I'm doing wrong with this calculation, see attached.

I am trying to evaluate a 10' long beam. Moment of inertia = 1 in^4, E=1500 ksi, uniform load = 200 lbf/ft.

Obviously these numbers are just arbitrary but I can't seem to get the correct deflection.
Also how do I rescale the graph? Just zoom with mouse?
BeamFEA -Test Simple Span 10ft beam.sm (178 KiB) downloaded 99 time(s).
#67 Posted: 1/23/2015 12:54:57 AM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

OK, I am going to try and finally get to work on this.

I will take the approach "either you generate a fake modeller output and feed that into the preprocessor"
Maybe Oxel has done some work on this?

I'm not sure which is best though. I could have the user input span lengths or input the location of the supports/hinges. My instinct says that maybe entering nodes is best then you can also define if the node is a hinge. So you have:

All inputs would have units

Support/hinge Matrix:
Row 1: location of support
Row 2: 1/0 (support / hinge)

Uniform Load matrix (uniform over all spans):
Row 1: Load

Partial load matrix:
Row 1: Start magnitude
Row 2: Start location
Row 3: End magnitude
Row 4: End location

Point Load matrix:
Row 1: Load magnitude
Row 2: Location

Sooo....

We would then create a matrix for the supports. We would call on template 2, set the X, set the y=0 say, not sure what to use to define there width/height.

I will start here see how it goes.
Also I hope to keep in mind that everything should be function oriented and repeatable on the same page.
Modeller input.sm (29 KiB) downloaded 68 time(s).
#68 Posted: 1/25/2015 7:51:10 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

RFreund, sorry for not being responsive lately. Quite busy at the moment.

I think for the supports you succeeded to implement the translation function from your favorite input format to modeler output. I just made some modifications:
- better readibility by introduction of temporary variables and by replacing nested ifs by cases()
- better robustness by creating valid modeler input even in case of unknown support type. In that case, a detailed error message is written to the output window via trace(). This is essential, as the input selection in the modeler gets lost whenever the input renders invalid. This is annoying, because you have to re-select the pre-defined layout in the modeler again.
modeler1.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#69 Posted: 1/25/2015 10:33:22 AM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Excellent Martin. Thank you. I will post back soon, hopefully, with loading, etc.


#70 Posted: 1/25/2015 11:57:59 AM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

Martin,

Again thank you for the response. Attached is an updated version, probably with poor scripting again by myself (side question, is "scripting" the correct term to use here?).

So a few questions/comments:

  1. Could you elaborate on cases()? When I type in cases its description is "Define piecewise functions"
  2. Also (maybe this is cases) but how did you create the system using if and otherwise?
  3. I'm not sure the best/simplest way to handle the scaling of the beam and loads. If I understand correctly, the beam height from the modeler is given to the preproccesor and used for EI. Likewise the height of the loads are used to determine magnitude in the preprocessor. Therefore it would seem that I need to relate the scaling of the beam to the E and I input and the loads to the load input. However I think that maybe it would be more 'robust' if the scaling was separate from the loading input. That way you can change the scaling to proportion things as you'd like. Or mabye all items should be in proportion to the length of the beam. Maybe this is wrong though. In any case, I think that direct input into the preprocessor would be too challenging for me or creating unnecessary work and my main objective is to have a functioning script and maybe we can modify later. I'm looking for input on what you think is the best approach.
  4. Another issue is Varying loads that are trapezoidal in shape. Really I need to send the w.p# input to a script which checks for this condition and creates a new matrix with a partial uniform load a triangular load over the same length of beam. In the attached a put a small section of script showing my intent.


Thanks again! I think once I have a figured this out I will have an efficient beam calculator and I can start posting more analysis / design examples/snippets.
Modeller input.sm (82 KiB) downloaded 97 time(s).
#71 Posted: 1/28/2015 11:43:46 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

cases(): You find them under cases() in the function index of the interactive handbook.

trapezoidal distributed loads: You indeed have to stack them from uniform and triangular loads in the modeller, because trapezoidal templates would have a fixed ratio of left to right value regardless of scaling.
In the element matrix, however, you can specify the corner values directly.

Units and scaling: there is a cloud version with units: http://smath.info/cloud/file/NESDC.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#72 Posted: 2/8/2015 3:41:34 PM
Ryan Freund

Ryan Freund

19 likes in 339 posts.

Group: User

It should be noted that cases does NOT handle units or atleast it does not appear to. Very odd behavior if trying to compare units using cases.

EDIT:
OK, maybe it is not cases see here:

http://en.smath.info/forum/yaf_postsm19047_BeamFEA-Questions.aspx#post19047
  • New Posts New Posts
  • No New Posts No New Posts