![]() |
.Simulation
|
This module defines the RPK class. More...
#include <RPK.h>
Public Member Functions | |
RPK (const double ¤tTime, 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. | |
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.
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.
currentTime | A reference to the variable holding the current simulation time. |
info | An InfoStruct whose values are in simulation units. |
outDir | The path where generated output will be saved to. |
double MDSimulation::RPK::d2Rdt2 | ( | ) | const |
double MDSimulation::RPK::FindCrossingTime | ( | const Particle & | n | ) | const |
n | The 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. |
double MDSimulation::RPK::NextStep | ( | ) |
double MDSimulation::RPK::NextStepTime | ( | ) |
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 |
time | The time to compute the radius. |
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.
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 |
The | time to compute the radius. |