Commit f59a8d41 authored by Johannes Blaschke's avatar Johannes Blaschke
Browse files

fluid field pressure is coupled to squirmers

parent 54b23ffd
......@@ -18,6 +18,7 @@
},
"projectManager.showProjectNameInStatusBar": true,
"files.associations": {
"atomic": "cpp"
"atomic": "cpp",
"vector": "cpp"
}
}
\ No newline at end of file
......@@ -467,6 +467,21 @@ conserve_momentum_vp(vparticle * vparticles, int nvparticles, squirmer * squirme
// keep track of momentum changes
if((config.squirmeron == 1) && (config.without_squirmer_stream == 0))
{
#ifdef ENABLE_PFIELD
if(config.pressure == 1)
{
vector3 grad_p = c->grad_pressure;
vscale(& grad_p, -config.pressure_k);
// equivalent momentum change due to external pressure field
vector3 pressure_del_p;
vmul(& pressure_del_p, & grad_p, config.dt);
// add pressure-field delta_p to vparticle delta_p (before the msum book-keeping)
vadd_ip(& vp->del_p, & pressure_del_p);
}
#endif
int sindex = vp->belonging; //NOTE: not defined for tryp! (TODO)
add_to_msum(vp, & msums[sindex], sindex); //NOTE: this is only necessary if squirmers are on!
}
......
......@@ -33,7 +33,6 @@
#include "random_number_generation.h"
#include "clearing_functions.h"
#include "ghost_particle.h"
// #include "time.h"
#include "mpi.h"
#include "string.h"
#include "trypanosome.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment