Giter VIP home page Giter VIP logo

Comments (6)

armantekinalp avatar armantekinalp commented on June 22, 2024

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.

davenpi avatar davenpi commented on June 22, 2024

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.

armantekinalp avatar armantekinalp commented on June 22, 2024

@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.

davenpi avatar davenpi commented on June 22, 2024

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?
Screen Shot 2021-10-15 at 7 46 03 PM
.

from pyelastica.

armantekinalp avatar armantekinalp commented on June 22, 2024

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.

armantekinalp avatar armantekinalp commented on June 22, 2024

#24

from pyelastica.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.