Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

DragParticle Class Reference

BinItem-derived object to encapsulate definition of particle in fluid. More...

#include <DragParticle.H>

Inheritance diagram for DragParticle:

Inheritance graph
[legend]
Collaboration diagram for DragParticle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DragParticle ()
 default constructor

 DragParticle (const RealVect &a_position)
 partial constructor, to match the one in BinItem

 DragParticle (const RealVect &a_position, const RealVect &a_velocity, const DiscreteDeltaFn *a_deltaFnPtr)
 full constructor -- calls matching define function

 DragParticle (const DragParticle &)
 copy constructor

virtual ~DragParticle ()
 destructor

virtual void define (const RealVect &a_position)
 partial define function

virtual void define (const RealVect &a_position, const RealVect &a_velocity, const DiscreteDeltaFn *a_deltaFnPtr)
 full define function

virtual void setVel (const RealVect &a_vel)
 set velocity

virtual void setFluidVel (const RealVect &a_vel)
 set local fluid velocity

virtual void setFluidVel (Real a_vel, int a_comp)
 set local fluid velocity, single component

virtual void setDragForce (const RealVect &a_force)
 set drag force

virtual void setBodyForce (const RealVect &a_force)
 set force due to gravity (will be added to any computed drag force)

virtual RealVect velocity () const
 get velocity

virtual RealVect totalForce () const
 get total force on the particle

virtual RealVect dragForce () const
 get drag force on the particle

virtual RealVect bodyForce () const
 get constant body force

virtual void setDragCoeff (const Real a_dragCoeff)
 set drag coefficient used to compute drag force

virtual Real mass () const
 get mass of particle

virtual void setMass (Real a_mass)
 set mass of particle

virtual bool boundaryMarker () const
 has this particle recently hit the boundary?

virtual void setBoundaryMarker (bool a_marker)
 set the boundary marker flag

virtual DragParticleclone () const
 create a clone of this particle

virtual void computeDragForce (const RealVect &a_flowVelocity)
 compute force on particle from fluid

virtual void computeDragForce ()
 compue force on particle from fluid, using stored fluid vel

virtual Real computeK (const RealVect &a_x, int a_idir, int a_jdir) const
 compute K_{ij} at x for this particle

virtual Real computeProjForce (const RealVect &a_x, int a_idir) const
 compute sum_j f_j K_{ij} for j=0,SpaceDim-1 (DRAG force on fluid)

virtual void computeProjForce (FArrayBox &a_force, const Box &a_box, Real a_dx, RealVect &a_origin) const
 increment FAB with sum_j f_j K_{ij} for j=0,SpaceDim-1 (force on fluid)

virtual void computeProjForce (FArrayBox &a_force, const Box &a_box, int a_idir, int a_destComp, Real a_dx, RealVect &a_origin) const
 increment FAB with sum_j f_j K_{ij} for j=0,SpaceDim-1 (force on fluid)

virtual int size () const
 Number of bytes used by linearIn()/linearOut().

virtual int linearSize () const
 (just calls size() function)

virtual void linearOut (void *a_buf) const
 Write a serialized (packed) representation into a_buf.

virtual void linearIn (const void *const a_buf)
 Extract a serialized (packed) representation from a_buf.

int preAllocatable ()
DragParticleoperator= (const DragParticle &a_src)
 assignment operator (makes clone of delta function)


Protected Member Functions

void setDefaultValues ()
 set default values for data members


Protected Attributes

RealVect m_velocity
 velocity

RealVect m_fluidVel
 local fluid velocity (stored here for convenience

RealVect m_dragForce
 drag force vector

RealVect m_bodyForce
 body force vector

Real m_dragCoeff
 drag coefficient

Real m_mass
 particle mass

bool m_boundaryMarker
 marker that we've interacted with the physical boundary

DiscreteDeltaFnm_deltaFnPtr
 local copy of discrete delta function


Detailed Description

BinItem-derived object to encapsulate definition of particle in fluid.

The DragParticle class encapsulates the definition of the particles used for suspensions of particles, and is derived from BinItem to allow it to interface with the BinFab infrastructure in Chombo.

The DragParticle also contains a DiscreteDeltaFn object to specify the spreading function which will be used for this particle.


Constructor & Destructor Documentation

DragParticle::DragParticle  ) 
 

default constructor

DragParticle::DragParticle const RealVect a_position  ) 
 

partial constructor, to match the one in BinItem

Calls matching define function

DragParticle::DragParticle const RealVect a_position,
const RealVect a_velocity,
const DiscreteDeltaFn a_deltaFnPtr
 

full constructor -- calls matching define function

DragParticle::DragParticle const DragParticle  ) 
 

copy constructor

virtual DragParticle::~DragParticle  )  [virtual]
 

destructor


Member Function Documentation

virtual RealVect DragParticle::bodyForce  )  const [inline, virtual]
 

get constant body force

virtual bool DragParticle::boundaryMarker  )  const [inline, virtual]
 

has this particle recently hit the boundary?

virtual DragParticle* DragParticle::clone  )  const [virtual]
 

create a clone of this particle

this may be a convenient way of creating a particle with the same properties (drag coeff, delta fn) as this one.

virtual void DragParticle::computeDragForce  )  [virtual]
 

compue force on particle from fluid, using stored fluid vel

virtual void DragParticle::computeDragForce const RealVect a_flowVelocity  )  [virtual]
 

compute force on particle from fluid

We assume a drag law for the force, where the drag force depends on the difference between the particle velocity and the local fluid velocity

virtual Real DragParticle::computeK const RealVect a_x,
int  a_idir,
int  a_jdir
const [virtual]
 

compute K_{ij} at x for this particle

Note that only the drag force is used in this computation, since body force does not act on the fluid.

virtual void DragParticle::computeProjForce FArrayBox a_force,
const Box a_box,
int  a_idir,
int  a_destComp,
Real  a_dx,
RealVect a_origin
const [virtual]
 

increment FAB with sum_j f_j K_{ij} for j=0,SpaceDim-1 (force on fluid)

Assumes force already computed and set. Note that this returns force exerted _by_ the particle on the surrounding fluid. Note that FAB is incremented, so you need to set to zero the first time this is called. This version computes only the idir component and puts it in the destComp component in the FAB

virtual void DragParticle::computeProjForce FArrayBox a_force,
const Box a_box,
Real  a_dx,
RealVect a_origin
const [virtual]
 

increment FAB with sum_j f_j K_{ij} for j=0,SpaceDim-1 (force on fluid)

Assumes drag force already computed and set. Note that this returns drag force exerted _by_ the particle on the surrounding fluid. Note that FAB is incremented, so you need to set to zero the first time this is called. Note that this is only the drag force, since the body force does not act on the fluid. This version computes all SpaceDim components

virtual Real DragParticle::computeProjForce const RealVect a_x,
int  a_idir
const [virtual]
 

compute sum_j f_j K_{ij} for j=0,SpaceDim-1 (DRAG force on fluid)

Assumes drag force already computed and set. Note that this returns force exerted _by_ the particle on the surrounding fluid. Note that this only takes drag force into account, since body force does not act on the fluid.

virtual void DragParticle::define const RealVect a_position,
const RealVect a_velocity,
const DiscreteDeltaFn a_deltaFnPtr
[virtual]
 

full define function

virtual void DragParticle::define const RealVect a_position  )  [virtual]
 

partial define function

Reimplemented from BinItem.

virtual RealVect DragParticle::dragForce  )  const [inline, virtual]
 

get drag force on the particle

virtual void DragParticle::linearIn const void *const  a_buf  )  [virtual]
 

Extract a serialized (packed) representation from a_buf.

Given a linear representation of the class data previously made using linearIn() in a_buf, set the data for this class.

virtual void DragParticle::linearOut void *  a_buf  )  const [virtual]
 

Write a serialized (packed) representation into a_buf.

Write a linear representation of the internal data. Assumes that sufficient memory for the buffer has already been allocated by the caller.

Reimplemented from BinItem.

virtual int DragParticle::linearSize  )  const [virtual]
 

(just calls size() function)

virtual Real DragParticle::mass  )  const [inline, virtual]
 

get mass of particle

DragParticle& DragParticle::operator= const DragParticle a_src  ) 
 

assignment operator (makes clone of delta function)

int DragParticle::preAllocatable  )  [inline]
 

Reimplemented from BinItem.

virtual void DragParticle::setBodyForce const RealVect a_force  )  [virtual]
 

set force due to gravity (will be added to any computed drag force)

bodyForce is a constant force which is added to any computed drag force for the total force on the particle

virtual void DragParticle::setBoundaryMarker bool  a_marker  )  [virtual]
 

set the boundary marker flag

void DragParticle::setDefaultValues  )  [protected]
 

set default values for data members

virtual void DragParticle::setDragCoeff const Real  a_dragCoeff  )  [virtual]
 

set drag coefficient used to compute drag force

virtual void DragParticle::setDragForce const RealVect a_force  )  [virtual]
 

set drag force

virtual void DragParticle::setFluidVel Real  a_vel,
int  a_comp
[virtual]
 

set local fluid velocity, single component

virtual void DragParticle::setFluidVel const RealVect a_vel  )  [virtual]
 

set local fluid velocity

virtual void DragParticle::setMass Real  a_mass  )  [virtual]
 

set mass of particle

virtual void DragParticle::setVel const RealVect a_vel  )  [virtual]
 

set velocity

virtual int DragParticle::size  )  const [virtual]
 

Number of bytes used by linearIn()/linearOut().

Returns the size, in number of bytes, of a flat linear representation of the data in this object.

Reimplemented from BinItem.

virtual RealVect DragParticle::totalForce  )  const [inline, virtual]
 

get total force on the particle

virtual RealVect DragParticle::velocity  )  const [inline, virtual]
 

get velocity


Member Data Documentation

RealVect DragParticle::m_bodyForce [protected]
 

body force vector

bool DragParticle::m_boundaryMarker [protected]
 

marker that we've interacted with the physical boundary

DiscreteDeltaFn* DragParticle::m_deltaFnPtr [protected]
 

local copy of discrete delta function

Real DragParticle::m_dragCoeff [protected]
 

drag coefficient

RealVect DragParticle::m_dragForce [protected]
 

drag force vector

RealVect DragParticle::m_fluidVel [protected]
 

local fluid velocity (stored here for convenience

Real DragParticle::m_mass [protected]
 

particle mass

RealVect DragParticle::m_velocity [protected]
 

velocity


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 13:58:32 2004 for Chombo&INSwithParticles by doxygen 1.3.2