.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
MDSimulation::RPK Class Reference

This module defines the RPK class. More...

#include <RPK.h>

Public Member Functions

 RPK (const double &currentTime, const InfoStruct &info, const std::string &outDir="")
 Create a new RPK equation using the given InfoStruct for the various constants needed. More...
 
 ~RPK ()
 Clean up the dynamically allocated memory for the solver methods.
 
double NextStep ()
 
void AddSample (const double time, const double pressure)
 Add a sample to the pressure gauge.
 
double R (const double time) const
 
double V (const double time) const
 
double VSmart (const double time) const
 Smarter version of the velocity calculation that uses the computed velocities for each end of the current portion of the RPK equation and interpolates over those, rather than guessing by using the slope of the radius.
 
double d2Rdt2 () const
 
double NextStepTime ()
 
void ReadPressureGauge ()
 Reads the pressure gauge to update the current pressure and dpdt value. More...
 
double FindCrossingTime (const Particle &n) const
 
template<typename Writer >
void Serialize (Writer &writer) const
 New serialization method that makes use of the ptree library. More...
 
state_type operator() (const state_type &x, state_type &dxdt, const double t) const
 Deserialization method that can read in the data produced by the serialize method. More...
 
double AcousticPressure (const double time) const
 Compute the acoustic pressure at the given time.
 
double AcousticPressureDerivative (const double time) const
 Compute the derivative of the acoustic pressure at the given time.
 

Detailed Description

This module defines the RPK class.

This class is used for the integration of the RPK equation. It defines the methods necessary to step the equation and determine its relevant state. In addition, it handles the computation of collisions between the bubble wall and gas particles in the system.

Author
Spenser Bauman

Constructor & Destructor Documentation

MDSimulation::RPK::RPK ( const double &  currentTime,
const InfoStruct info,
const std::string &  outDir = "" 
)

Create a new RPK equation using the given InfoStruct for the various constants needed.

This assumes that the given info struct is already in simulation units.

Parameters
currentTimeA reference to the variable holding the current simulation time.
infoAn InfoStruct whose values are in simulation units.
outDirThe path where generated output will be saved to.

Member Function Documentation

double MDSimulation::RPK::d2Rdt2 ( ) const
Returns
Bubble Acceleration: R''(t)
double MDSimulation::RPK::FindCrossingTime ( const Particle n) const
Parameters
nThe particle to compute intersection time with the bubble wall. NOTE: This function assumes that the Update method was performed used to update the particle position to where it should be at the current time.
Returns
Time necessary for the given atom to impact the wall based on the estimated interpolation of the bubble wall position.
double MDSimulation::RPK::NextStep ( )
Returns
The end time of the step made.
double MDSimulation::RPK::NextStepTime ( )
Returns
Next time step
state_type MDSimulation::RPK::operator() ( const state_type &  x,
state_type &  dxdt,
const double  t 
) const

Deserialization method that can read in the data produced by the serialize method.

Performs an evaluation of the RPK function. Given r, r', and t, this will return the estimated next r' and r''.

double MDSimulation::RPK::R ( const double  time) const
Parameters
timeThe time to compute the radius.
Returns
Bubble radius: R(Time)
void MDSimulation::RPK::ReadPressureGauge ( )

Reads the pressure gauge to update the current pressure and dpdt value.

This should be called after a fixed amount of simulation time.

template<typename Writer >
void MDSimulation::RPK::Serialize ( Writer &  writer) const

New serialization method that makes use of the ptree library.

Rather than write to a file, this function writes to the property tree given as a parameter.

double MDSimulation::RPK::V ( const double  time) const
Parameters
Thetime to compute the radius.
Returns
Bubble velocity: V(t) = R'(t) = kR

The documentation for this class was generated from the following files: