Comments (5)
Hi, this code allows to limit Y displacement of the sphere.
Y_.first() - Position
Y_.second() - Velocity
You don't need to modify your RK2 solver if your object starts to move from point different to (0 0 0)
from trainingtracks.
Thank you. One thing more to clear: If the object start to move from an arbitrary position (i.e. Xc, Yc), not from (0 0 0), then how and what part to modify? Where Xc = 0.5, Yc = 0.5 or any value other than 0.
from trainingtracks.
Hi, sorry for the late reply.
If Xc = Yc = 0.5, then:
- Center of the object in your mesh must be in the poing (0.5; 0.5)
- Yold_.first() = 0.5 at startup
from trainingtracks.
Thank you for the reply.
Sorry, I forget to mention about my domain boundaries, they are [0,0] to [10,10]. Normally, the above is true when domain is extended in both positive and negative directions e.g [-1,-1] to [1,1]. In my case, the rest length for the spring (-kx) will be different that what I am confused with. What will be the "Yold_.first() or Ymid.first()" in the equation:
Ymid.second()= Yold_.second() + 0.5*dt*(-C_*Yold_.second() - K_*Yold_.first() + R_*yForce) / M_;
Y_.second()= Yold_.second() + dt*(-C_*Ymid.second() - K_*Ymid.first() + R_*yForce) / M_;
I have attached an illustrative image to clear my point and want to modify the equations according to the sketched situation.
from trainingtracks.
Hi, you don't need to change equations. Equations describes numerical solution of some ODE from some initial position.
Just initialize your Yold_.first() with 5.0 in the class constructor or somewhere, where are you creating variable and reading data
from trainingtracks.
Related Issues (6)
- Boundary condition and Mesh Independence HOT 2
- i have the very close value of SPL, does it correct. it seems the spl should have various value with different requency HOT 2
- Compilation problem of "simpleFsi-OF4.1" in foam-extend 4.1 HOT 3
- Implement in OpenFOAM.org version 6 HOT 2
- fatal error with polyMesh HOT 1
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 trainingtracks.