Commit e2e53b36 by Jonathan Lambrechts

### clean hydro-quebec + tag for boundary objects

parent 159d021a
 ... ... @@ -11,23 +11,24 @@ \usepackage[round]{natbib} \usetikzlibrary{arrows} \newcommand{\re}{\mathit{R\kern-.15em e}} \DeclareUnicodeCharacter{183}{{\,\cdot\,}} \begin{document} \bibliographystyle{plainnat} \noindent NB : all those papers deal with gaz-particle mixture in general and fluidized bed in particular. I'm not sure this can be applied to subsurface water. \section*{Particle-fluid interaction forces} While other forces can be seen in the literature \citep{zhu_discrete_2007}, the principal forces present in the gas-particle interactions are the drag force $F_d$ and the pressure gradient force $F_p$. While other forces can be seen in the literature \citep{zhu_discrete_2007}, the principal forces present in the gas-particle interactions are the drag force $G$ and the pressure gradient force $F$. \subsection*{Pressure gradient force} The pressure gradient force can be easily computed by F_p = -V_p∇p F = -V_p∇p where $p$ is the fluid pressure field and $V_p$ the volume of the particle \citep{anderson_fluid_1967}. \subsection*{Drag force} There exists many parameterization of the drag force, \citet{li_gas-particle_2003} did a systematic study that indicates that they all possess similar predictive capability. \citet{di_felice_fluid-particle_2012} uses the following simple formulation: \label{eq:fdp} F_d = f(ε)C_d|u_p - u_f|(u_p - u_f)\frac{πd²_pρ_f}{8} G = f(ε)C_d|u_p - u_f|(u_p - u_f)\frac{πd²_pρ_f}{8} where $C_d$ is the drag coefficient for an isolated particle and $f(ε)$ take into account the effect of the surrounding particles. $C_d$ is a function of the Reynolds number of the particle $\re_p =d_pρ_f(u_p-u_f)εμ_f^{-1}$, one can use for example \citep{dallavalle_micromeritics:_1943} : ... ... @@ -46,9 +47,20 @@ dependency on the Reynolds number: for example, that proposed by \citet {di_feli \section*{Discretization} \begin{enumerate} \item $ε$ is computed as the projection of the particles volume on the mesh nodes \item $ε$ and $u_f$ are interpolated at the particles position \item $F_d$ and $F_p$ are evaluated for each particle \item $F_d$ and $F_p$ are projected on the mesh nodes for the fluid equation \item[] This is exactly like a quadrature rule where the particles position would be the quadrature points and the particle volume the corresponding weights. \item $ε$ and $u_f$ are interpolated at the particle positions \item $F_d$ and $F_p$ are assembled on the residual. \begin{align*} F_i &= ∑_pF_p(P_p, (∇P)_p)φ_i(x_p)\\ \frac{∂F_i}{∂P_j} &=∑_p\left(\frac{∂F_p}{∂P_p}\frac{∂P_p}{∂P_j}φ_i(x_p) + \frac{∂F_p}{∂(∇P)_p}·\frac{∂(∇P)_p}{∂P_j}\right)φ_i(x_p)\\ &=∑_p\left(\frac{∂F_p}{∂P_p}φ_j(x_p) + \frac{∂F_p}{∂(∇P)_p}{·}∇φ_j(x_p)\right)φ_i(x_p) \end{align*} \end{enumerate} \section{Comparison with Darcy} In our current implementation (Brinkman law), we have $F = -ρ\frac{με²}{K₁}(u_p - u_f) + \dots\text{, with }K₁ = \frac{k₁ε³}{(1-ε)²}$ \bibliography{zotero.bib} \end{document}
 ... ... @@ -30,6 +30,13 @@ PyArray_UpdateFlags((PyArrayObject*)array, NPY_ARRAY_ALIGNED); return array; } PyObject *tagVector2PyArray(int *fm) { npy_intp dims[1] = {vectorSize(fm)}; PyObject *array = PyArray_New(&PyArray_Type, 1, dims, NPY_INT, NULL, (void*)fm, 0, NPY_ARRAY_C_CONTIGUOUS|NPY_ARRAY_WRITEABLE, NULL); PyArray_UpdateFlags((PyArrayObject*)array, NPY_ARRAY_ALIGNED); return array; } int pySequenceToCoord(PyObject *o, double x[DIMENSION]) { if (!PySequence_Check(o)) return 0; ... ... @@ -67,16 +74,21 @@ struct ParticleProblem{}; return self; } void addParticle(const double x[DIMENSION], double r) { particleProblemAddParticle($self->_this, x, r); } size_t addBoundaryDisk(const double x0[DIMENSION], double r) {return particleProblemAddBoundaryDisk($self->_this, x0, r);} size_t addBoundarySegment(const double x0[DIMENSION], const double x1[DIMENSION]) {return particleProblemAddBoundarySegment($self->_this, x0, x1);} size_t addBoundaryDisk(const double x0[DIMENSION], double r, int tag) {return particleProblemAddBoundaryDisk($self->_this, x0, r, tag);} size_t addBoundarySegment(const double x0[DIMENSION], const double x1[DIMENSION], int tag) {return particleProblemAddBoundarySegment($self->_this, x0, x1, tag);} #if DIMENSION==3 void addBoundaryTriangle(const double x0[DIMENSION], const double x1[DIMENSION], const double x2[DIMENSION]) {particleProblemAddBoundaryTriangle($self->_this, x0, x1, x2);} void addBoundaryTriangle(const double x0[DIMENSION], const double x1[DIMENSION], const double x2[DIMENSION], int tag) {particleProblemAddBoundaryTriangle($self->_this, x0, x1, x2, tag);} #endif void write(const char *filename) { particleProblemWrite($self->_this, filename); } void iterate(double alert, double dt, double tol = 0.005) { particleProblemIterate($self->_this, alert, dt, tol); } double maxdt(double alert) { return particleProblemMaxDt($self->_this, alert); } void load(const char *filename) { particleProblemLoad($self->_this, filename); } PyObject *diskTag() {return tagVector2PyArray(particleProblemDiskTag($self->_this));} PyObject *segmentTag() {return tagVector2PyArray(particleProblemSegmentTag($self->_this));} #if DIMENSION == 3 PyObject *triangleTag() {return tagVector2PyArray(particleProblemTriangleTag($self->_this));} #endif PyObject *velocity() {return coordVector2PyArray(particleProblemVelocity($self->_this), particleProblemNParticle($self->_this), DIMENSION);} PyObject *disks() { double *d = particleProblemDisk(\$self->_this); ... ...