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

step/stepcore

StepCore::CoulombForce

StepCore::CoulombForce Class Reference
[Physical forces]

#include <coulombforce.h>

Inheritance diagram for StepCore::CoulombForce:

Inheritance graph
[legend]

List of all members.


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.


Public Member Functions

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

Protected Member Functions

ObjectErrors * createObjectErrors ()

Protected Attributes

double _coulombConst

Constructor & Destructor Documentation

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

Constructs CoulombForce.

Definition at line 41 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 48 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]

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"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
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