• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

step/stepcore

StepCore::CoulombForce

StepCore::CoulombForce Class Reference
[Physical forces]

Coulomb electrostatic force. More...

#include <coulombforce.h>

Inheritance diagram for StepCore::CoulombForce:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CoulombForce (double coulombConst=Constants::Coulomb)
void calcForce (bool calcVariances)
double coulombConst () const
CoulombForceErrors * coulombForceErrors ()
void setCoulombConst (double coulombConst)

Protected Member Functions

ObjectErrors * createObjectErrors ()

Protected Attributes

double _coulombConst

Detailed Description

Coulomb electrostatic force.

The force acts between pairs of charged bodies (currently only ChargedParticle) and equals:

\[ \overrightarrow{f} = k_C \frac{q_1 q_2 \overrightarrow{r}} {|\overrightarrow{r}|^3} \]

where:
$k_C$ is CoulombForce::coulombConst
$q_1$ and $q_2$ is ChargedParticle::charge of the first and second body
$\overrightarrow{r}$ is difference of Particle::position of the first and second body

Todo:
Add interface for charged bodies, support bodies with distributed charge

Definition at line 82 of file coulombforce.h.


Constructor & Destructor Documentation

StepCore::CoulombForce::CoulombForce ( double  coulombConst = Constants::Coulomb  ) 

Constructs CoulombForce.

Definition at line 42 of file coulombforce.cc.


Member Function Documentation

void StepCore::CoulombForce::calcForce ( bool  calcVariances  )  [virtual]

Calculate force.

Bodies can be accessed through this->world()->bodies()

Implements StepCore::Force.

Definition at line 49 of file coulombforce.cc.

double StepCore::CoulombForce::coulombConst (  )  const [inline]

Get coulomb const.

Definition at line 93 of file coulombforce.h.

CoulombForceErrors* StepCore::CoulombForce::coulombForceErrors (  )  [inline]

Get (and possibly create) CoulombForceErrors object.

Definition at line 98 of file coulombforce.h.

ObjectErrors* StepCore::CoulombForce::createObjectErrors (  )  [inline, protected, virtual]

For internal use only.

Creates specific ObjectErrors-derived class (to be reimplemented in derived classes)

Reimplemented from StepCore::Item.

Definition at line 102 of file coulombforce.h.

void StepCore::CoulombForce::setCoulombConst ( double  coulombConst  )  [inline]

Set coulomb const.

Definition at line 95 of file coulombforce.h.


Member Data Documentation

double StepCore::CoulombForce::_coulombConst [protected]

Definition at line 104 of file coulombforce.h.


The documentation for this class was generated from the following files:
  • coulombforce.h
  • coulombforce.cc

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  •     lib
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal