Comments (3)
I believe there is no designed feature to do that. The data structures do exist but are somewhat hidden from the user. You can access the list of segments
and each segment contains the shear_force
and bending_moment
among others. For instance, in example 1:
import matplotlib.pyplot as plt
from symbeam import beam
test_beam = beam("l", x0=0)
test_beam.add_support(0, "roller")
test_beam.add_support("l", "pin")
test_beam.add_distributed_load(0, "l/2", "-2 * q / l * x")
test_beam.add_distributed_load("l/2", "l", "-q")
test_beam.solve()
fig, ax = test_beam.plot()
plt.savefig(__file__.split(".py")[0] + ".svg")
# Accessing the symbolic expressions of the shear force and bending moment
print(test_beam.segments[0].shear_force)
print(test_beam.segments[0].bending_moment)
# Evaluate in the target point, x0
x0 = 1.0
print(test_beam.segments[0].shear_force.subs({'x': x0}))
print(test_beam.segments[0].bending_moment.subs({'x': x0}))
In the future, one could add new functions, evaluate_shear_force(x)
and evaluate_bending_moment
to retrieve this information more easily.
from symbeam.
@Juulpy if this suffices for you at this moment, it will be fine for me. Otherwise, I can create a new release with the new feature.
from symbeam.
Since the code allows doing what has been initially proposed in the issue, and a possible solution has been demonstrated, I will consider this issue closed.
from symbeam.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symbeam.