This function defines a coil in the z-direction from a (constant) starting point, a (constant) length L, a (constant) radius r, a (constant) number or revelations N and a (constant) rotation speed (rev/s)
More...
|
| Coil () |
|
| Coil (Vec3D Start, double L, double r, double N, double omega, double thickness) |
|
virtual Coil * | copy () const |
|
bool | get_distance_and_normal (BaseParticle &P, Mdouble &distance, Vec3D &normal_return) |
|
void | move_time (Mdouble dt) |
| Allows the wall to be moved to a new position (also orthogonal to the normal), and setting the velocity. More...
|
|
void | read (std::istream &is) |
| reads wall More...
|
|
void | print (std::ostream &os) const |
| outputs wall More...
|
|
Vec3D | get_Velocity () const |
| Todo{Implement this function correctly}. More...
|
|
| BaseWall () |
|
| BaseWall (const BaseWall &p) |
|
virtual | ~BaseWall () |
|
virtual void | clear () |
|
virtual void | move (Mdouble position_ UNUSED) |
| Allows the wall to be moved to a new position. More...
|
|
virtual void | move (Vec3D velocity_ UNUSED, Mdouble dt UNUSED) |
| Allows the wall to be moved to a new position (also orthogonal to the normal), and setting the velocity. More...
|
|
virtual bool | get_distance_and_normal (BaseParticle &P UNUSED, Mdouble &distance UNUSED, Vec3D &normal_return UNUSED)=0 |
|
void | set_Velocity (Vec3D new_) |
| access function for velocity More...
|
|
virtual void | read (std::istream &is UNUSED)=0 |
|
virtual void | print (std::ostream &os UNUSED) const =0 |
|
virtual void | moveInHandler (int newPos) |
|
int | getIndSpecies () const |
|
void | setIndSpecies (const int _new) |
|
const Vec3D & | get_Force () const |
|
const Vec3D & | get_Torque () const |
|
void | set_Force (Vec3D _new) |
|
void | set_Torque (Vec3D _new) |
|
void | set_Index (int index) |
|
void | set_Id (int id) |
|
void | add_Force (Vec3D _new) |
|
void | add_Torque (Vec3D _new) |
|
This function defines a coil in the z-direction from a (constant) starting point, a (constant) length L, a (constant) radius r, a (constant) number or revelations N and a (constant) rotation speed (rev/s)
q is a new coordinate going from 0 to 1 and t is the time x=xs+r*cos(2*pi*(offset+N*q)) y=ys+r*sin(2*pi*(offset+N*q)) z=zs+q*L
Definition at line 40 of file Coil.h.
To find the contact point we have to minimize (with respect to q) Distance^2=(x-x0-r*cos(2*Pi*(offset+N*q)))^2+(y-y0-r*sin(2*Pi*(offset+N*q)))^2+(z-z0-q*L)^2 Using polar coordinated (i.e. x-x0=R*cos(alpha), y-y0=R*sin(alpha) and dz=z-z0) Distance^2=R^2+r^2-2*R*r*cos(alpha-2*Pi*(offset+N*q))+(dz-q*L)^2
So we have to minimize: Distance^2=R^2+r^2-2*R*r*cos(alpha-2*Pi*(offset+N*q))+(dz-q*L)^2 For this we use the Euler algoritm
The initial guess will be in the maximum of the cos closest to the minimum of the parabolic part Minima of the cos are at alpha-2*Pi*(offset+N*q)=2*k*Pi (k=integer) q=alpha/(2*Pi*N)-k/N-offset/N (k=integer)
Definition at line 77 of file Coil.h.
References BaseParticle::get_Position(), BaseParticle::get_WallInteractionRadius(), Vec3D::GetLength(), L, N, offset, constants::pi, R, r, constants::sqr_pi, Start, thickness, Vec3D::X, Vec3D::Y, and Vec3D::Z.
119 }
while(fabs(dd/ddd)>1e-14);
146 normal_return/=normal_return.
GetLength();
Mdouble get_WallInteractionRadius() const
const Vec3D & get_Position() const
Mdouble GetLength() const
Implementation of a 3D vector (by Vitaliy).