Comments (6)
Hi @davenpi ,
Thank you for pointing out the errors. We will fix getting started guide soon. But for now here is the code you can use.
direction = np.array([0.0, 1.0, 0.0])
normal = np.array([1.0, 0.0, 0.0])
rod1 = CosseratRod.straight_rod(
n_elements = 50, # number of elements
start = np.array([0.0, 0.0, 1.0]), # Starting position of first node in rod
direction = direction, # Direction the rod extends
normal = np.cross(direction, normal), # normal vector of rod
base_length=0.5, # original length of rod (m)
base_radius=10e-2, # original radius of rod (m)
density = 1e3, # density of rod (kg/m^3)
nu = 1e-3, # Energy dissipation of rod
youngs_modulus = 1e7, # Elastic Modulus (Pa)
poisson_ratio = 0.495, # Poisson Ratio
)
from pyelastica.
Thanks! FYI I ran into similar trouble in the post processing section of the Slithering Snake example notebook. There it seems that the results should be plotted but no plots get produced by running the code as is. From the wording it seems like there should be some visual output or am I off base?
from pyelastica.
@davenpi I run the Slithering Snake example notebook on binder and it outputs a snake velocity plot and a video showing the snake motion. Where did you run the notebook?
from pyelastica.
I'm running it in a Colab notebook. Everything before the screenshot works. The problem is the "analysis functions" import in the compute_and_plot_velocity
function. My thinking was that this notebook should generate plots in a self contained manner but it seems that I need to define my own module to make this work. Is that correct?
.
from pyelastica.
You don't need to define your own module if you just add analysis_functions in the same directory as the notebook. Let me know if you have any other questions.
from pyelastica.
from pyelastica.
Related Issues (20)
- Reproducing snake diffraction results from your Nat Comm Paper HOT 7
- Failure for Helix under Gravity Case HOT 2
- Can PyElastica support GPU acceleration? HOT 3
- Do PyElastica support to simulate a rod containing two segments? HOT 3
- Question about base length HOT 8
- Replicating side-winding results from your Nat-comm snake paper HOT 29
- Instant controler and simulation HOT 6
- Small scale rod simulation HOT 11
- Updating muscle forces mid-simulation - how does it work? HOT 1
- Small-scale simulation problem 2 HOT 1
- OneEndFixedBC didn't work for applying a external torque HOT 4
- Adding force and torque at same time HOT 5
- How to using PyElastica data to visualize in 3D models? HOT 1
- `FileNotFoundError` `python continuum_snake.py` HOT 1
- Bug and fix in 2_Slithering_Snake.ipynb HOT 1
- Task 1: Utilizing Python to clean and convert data from Elastica into a format recognizable by Blender. HOT 1
- Avoid having randomized unittest HOT 17
- [GSOC project 3] Binding PyElastica with Elastica++ HOT 1
- GSoC interest in Optimizing backend kernels in PyElastica HOT 1
- Examples not running due to modules not being found HOT 18
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 pyelastica.