Comments (7)
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:
-
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. -
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 inelastica/boundary_condition.py
. I suggest you to especially look atHelicalBucklingBC
. -
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 inexamples/TimoshenkoBeamCase/timoshenko.py
.
Let me know if you have further questions.
from pyelastica.
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.
Yes you need to write the class. Couple of reminders,
-
Make sure you derived new forcing class for
EndPointTorques
fromNoForces
class. Otherwise simulation will throw an error. -
Add your torque calculation in
apply_torque
class method. -
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.
Thank you very much.
from pyelastica.
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.
Yes it hasn't implemented yet. It will be implemented in future.
from pyelastica.
Thanks.
from pyelastica.
Related Issues (20)
- Catenary curve validation HOT 9
- Update the docs building scripts HOT 4
- Can closed chains of rods be constructed? HOT 4
- Possible Bug: Test restart functionality and applying constrains HOT 1
- Reorganize the ring rods factory function HOT 1
- Simulating magnetic Cosserat rods as an additional functionality of PyElastica HOT 1
- PyElastica for rigid rods HOT 1
- Type hints and static type checking for PyElastica HOT 2
- Frontal contact between rod and cylinder
- Contact between rod and sphere HOT 2
- Mesh Object Class HOT 2
- Contact unit tests authenticity HOT 1
- Error in generating video with continuum snake example HOT 10
- Remove test_rods.py from test_rod
- Binder is not working with Poetry HOT 4
- Issue with Plectoneme_case example HOT 2
- Support for Python 3.11 HOT 2
- Refactor: function documentations for NoForcing and FreeJoint HOT 1
- Rendering videos with RL cases HOT 17
- Necessity of sanity checks in factory_function.py HOT 3
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.