GithubHelp home page GithubHelp logo

Comments (7)

armantekinalp avatar armantekinalp commented on August 21, 2024

Hello,

We have not included that case in our examples for PyElastica yet. For the paper, it was simulated using our Cpp code. You can also set this case by yourself with PyElastica. What you have to do is:

  1. Set up your client file create simulation class, rod object, append rod object to simulation, etc. You can refer to one of the example cases in the examples directory. Also, I suggest you visit our website for more explanation.

  2. For the Plectonme-Solenoid test case, you need two boundary conditions. One boundary condition is already part of PyElastica which is OneEndFixedRod.. You need to write a second boundary condition. It should be rotating the other end of the rod throughout the twist time. To write a new boundary condition you can refer to already written boundary condition in elastica/boundary_condition.py . I suggest you to especially look at HelicalBucklingBC.

  3. Finally, you need to add a force at the end of the rod. For that, you can use EndPointForces class. One example use case of this class is given in examples/TimoshenkoBeamCase/timoshenko.py.

Let me know if you have further questions.

from pyelastica.

HogeLab avatar HogeLab commented on August 21, 2024

Thank you ! 
I also want to try the simulation in the case of adding a torque at the end of the rod , but a module like EndPointTorques dosen't exit.
Do I need to make that module by myself ?

from pyelastica.

armantekinalp avatar armantekinalp commented on August 21, 2024

Yes you need to write the class. Couple of reminders,

  1. Make sure you derived new forcing class for EndPointTorques from NoForces class. Otherwise simulation will throw an error.

  2. Add your torque calculation in apply_torque class method.

  3. We are storing external torques in material frame, so if you are applying torque in lab frame of reference then you need to multiply computed torques with director_collection.

class EndPointTorques(NoForces):
    def __init__(self, torque_start, torque_end):

        self.torque_start = torque_start # defined in global frame, shape(3,1)
        self.torque_end= torque_end # defined in global frame, shape(3,1)

   def apply_forces(self, system, time: np.float = 0.0):
        return

   def apply_torques(self, system, time: np.float = 0.0):

        system.external_torques[...,0] += system.director_collection[...,0] @ self.torque_start 
        system.external_torques[...,-1] += system.director_collection[...,-1] @ self.torque_end 
      

from pyelastica.

HogeLab avatar HogeLab commented on August 21, 2024

Thank you very much.

from pyelastica.

HogeLab avatar HogeLab commented on August 21, 2024

I can't find Self-contact setting that corresponds to useSelfContact in elastica++. Where is it ? Will it be programmed in the future?

from pyelastica.

armantekinalp avatar armantekinalp commented on August 21, 2024

Yes it hasn't implemented yet. It will be implemented in future.

from pyelastica.

HogeLab avatar HogeLab commented on August 21, 2024

Thanks.

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.