ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Implementation of dpd.hpp. More...
#include "config/config.hpp"
#include "dpd.hpp"
#include "BoxGeometry.hpp"
#include "cell_system/CellStructure.hpp"
#include "cells.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "random.hpp"
#include "system/System.hpp"
#include "thermostat.hpp"
#include <utils/Vector.hpp>
#include <utils/math/sqr.hpp>
#include <utils/math/tensor_product.hpp>
#include <utils/matrix.hpp>
#include <boost/mpi/collectives/reduce.hpp>
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <functional>
Go to the source code of this file.
Functions | |
Utils::Vector3d | dpd_noise (DPDThermostat const &dpd, int pid1, int pid2) |
Return a random uniform 3D vector with the Philox thermostat. | |
void | dpd_init (double kT, double time_step) |
static double | weight (int type, double r_cut, double k, double r) |
Utils::Vector3d | dpd_pair_force (DPDParameters const ¶ms, Utils::Vector3d const &v, double dist, Utils::Vector3d const &noise) |
Utils::Vector3d | dpd_pair_force (Particle const &p1, Particle const &p2, DPDThermostat const &dpd, BoxGeometry const &box_geo, IA_parameters const &ia_params, Utils::Vector3d const &d, double dist, double dist2) |
static auto | dpd_viscous_stress_local () |
Utils::Vector9d | dpd_stress (boost::mpi::communicator const &comm) |
Viscous stress tensor of the DPD interaction. | |
Implementation of dpd.hpp.
Definition in file dpd.cpp.
void dpd_init | ( | double | kT, |
double | time_step | ||
) |
Definition at line 63 of file dpd.cpp.
References System::get_system(), and System::System::nonbonded_ias.
Referenced by Thermostat::Thermostat::recalc_prefactors().
Utils::Vector3d dpd_noise | ( | DPDThermostat const & | dpd, |
int | pid1, | ||
int | pid2 | ||
) |
Return a random uniform 3D vector with the Philox thermostat.
Random numbers depend on
Definition at line 57 of file dpd.cpp.
References BaseThermostat::rng_counter(), and BaseThermostat::rng_seed().
Referenced by dpd_pair_force().
Utils::Vector3d dpd_pair_force | ( | DPDParameters const & | params, |
Utils::Vector3d const & | v, | ||
double | dist, | ||
Utils::Vector3d const & | noise | ||
) |
Definition at line 85 of file dpd.cpp.
References SteepestDescentParameters::gamma, params, Utils::sqr(), and weight().
Referenced by add_non_bonded_pair_force(), dpd_pair_force(), dpd_viscous_stress_local(), and Constraints::ShapeBasedConstraint::force().
Utils::Vector3d dpd_pair_force | ( | Particle const & | p1, |
Particle const & | p2, | ||
DPDThermostat const & | dpd, | ||
BoxGeometry const & | box_geo, | ||
IA_parameters const & | ia_params, | ||
Utils::Vector3d const & | d, | ||
double | dist, | ||
double | dist2 | ||
) |
Definition at line 102 of file dpd.cpp.
References DPDParameters::cutoff, IA_parameters::dpd, dpd_noise(), dpd_pair_force(), Particle::id(), P, Particle::pos(), DPDParameters::pref, DPD_Parameters::radial, DPD_Parameters::trans, Particle::v(), and BoxGeometry::velocity_difference().
Utils::Vector9d dpd_stress | ( | boost::mpi::communicator const & | comm | ) |
Viscous stress tensor of the DPD interaction.
This calculates the total viscous stress contribution of the DPD interaction. It contains only the dissipative contributions of the interaction without noise. It's calculated as the sum over all pair virials as
\[ \sigma^{\nu\mu} = V^{-1}\sum_i \sum_{j < i} r_{i,j}^{\nu} (- \gamma_{i,j} v_{i,j})^{\mu} \]
where \(\gamma_{i,j}\) is the (in general tensor valued) DPD friction coefficient for particles i and j, \(v_{i,j}\), \(r_{i,j}\) are their relative velocity and distance and \(V\) is the box volume.
Definition at line 174 of file dpd.cpp.
References System::System::box_geo, dpd_viscous_stress_local(), Utils::flatten(), and System::get_system().
Referenced by ScriptInterface::Analysis::Analysis::do_call_method(), and Observables::DPDStress::operator()().
|
static |
Definition at line 127 of file dpd.cpp.
References Distance::dist2, dpd_pair_force(), System::get_system(), P, Particle::pos(), Particle::type(), Particle::v(), and Distance::vec21.
Referenced by dpd_stress().
|
static |
Definition at line 78 of file dpd.cpp.
Referenced by walberla::LBWalberlaImpl< FloatType, Architecture >::add_force_at_pos(), dpd_pair_force(), walberla::LBWalberlaImpl< FloatType, Architecture >::get_density_at_pos(), walberla::LBWalberlaImpl< FloatType, Architecture >::get_velocity_at_pos(), walberla::lbm::accessor::Interpolation::kernel_get(), walberla::lbm::accessor::Interpolation::kernel_get(), walberla::lbm::accessor::Interpolation::kernel_set(), walberla::lbm::accessor::Interpolation::kernel_set(), and ParticleObservables::WeightedAverage< ValueOp, WeightOp >::operator()().