Hi there,

Attached are three .m scripts aimed at generating capillary files for use with 
Law2_ScGeom_CapillaryPhys_Capillarity. Obviously, the idea, discussed 
previously here and there on the mailing lists, is to make this part of YADE 
more "open-source". Also, there is two major differences with previous (L. 
Scholtes') work:

* these scripts may generate capillary files accommodating any contact angle 
value, instead of 0 previously

* they provide new output as an "orientation tensor" defined from the 
fluid-fluid interface of capillary bridges. These data would constitute new 
attributes of CapillaryPhys, see "nn11" and "nn33" in the attached version of 
CapillaryPhys.hpp. (Note that these nn11 and nn33 can be used to get the bridge 
fluid-fluid interface S as S = 2*nn11 + nn33). This is about post-processing 

The attached README.txt details the role of the .m files and how to use them: 
interested users in the end just need to give a look to, and launch, 

The core of the work, as usual, is solving the Laplace-Young equation for a 
capillary bridge configuration. The corresponding, quite classical, equations 
appear in solveLiqBridge file/function. There will be a dedicated journal paper 
on this topic, currently under "Minor Revision" review.

These files are ready to be pushed to trunk, together with updated 
CapillaryPhys (see attached), and Law2_ScGeom_CapillaryPhys_Capillarity, in 
order to read the new data (nn11 and nn33) from generated capillary files.

This email is for possible discussion before I perform the commit.



PS: Vaclav, I took the liberty cc-ing you since I had once the feeling you 
would be interested in such scripts. (Woo does not include any capillary 
interactions at the moment, though ?)


Jerome Duriez, Research Associate

University of Calgary, Dpt of Civil Engineering

+1 403 220 7367
*  Copyright (C) 2006 by luc Scholtes                                    *
*  luc.schol...@hmg.inpg.fr                                              *
*                                                                        *
*  This program is free software; it is licensed under the terms of the  *
*  GNU General Public License v2 or later. See file LICENSE for details. *
#pragma once

class CapillaryPhys : public FrictPhys
	public :
		int currentIndexes [4]; // used for faster interpolation (stores previous positions in tables)
		virtual ~CapillaryPhys() {};

	YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(CapillaryPhys,FrictPhys,"Physics (of interaction) for :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`.",
				 ((bool,meniscus,false,Attr::readonly,"True when a meniscus with a non-zero liquid volume (:yref:`vMeniscus<CapillaryPhys.vMeniscus>`) has been computed for this interaction"))
				 ((bool,isBroken,false,,"Might be set to true by the user to make liquid bridge inactive (capillary force is zero)"))
				 ((Real,capillaryPressure,0.,,"Value of the capillary pressure Uc. Defined as Ugas-Uliquid, obtained from :yref:`corresponding Law2 parameter<Law2_ScGeom_CapillaryPhys_Capillarity.capillaryPressure>`"))
				 ((Real,vMeniscus,0.,,"Volume of the meniscus"))
				 ((Real,Delta1,0.,,"Defines the surface area wetted by the meniscus on the smallest grains of radius R1 (R1<R2)"))
				 ((Real,Delta2,0.,,"Defines the surface area wetted by the meniscus on the biggest grains of radius R2 (R1<R2)"))
				 ((Vector3r,fCap,Vector3r::Zero(),,"Capillary force produced by the presence of the meniscus. This is the force acting on particle #2"))
				 ((short int,fusionNumber,0.,,"Indicates the number of meniscii that overlap with this one"))
				 ((Real,nn11,0.,,":math:`\\iint_A n_1 n_1 \\, dS = \\iint_A n_2 n_2 \\, dS`, $A$ being the liquid-gas surface of the meniscus, $\\vec n$ the associated normal, and $(1,2,3)$ a local basis with $3$ the meniscus orientation (:yref:`ScGeom.normal`). NB: $A$ = 2 :yref:`nn11<CapillaryPhys.nn11>` + :yref:`nn33<CapillaryPhys.nn33>`."))
				 ((Real,nn33,0.,,":math:`\\iint_A n_3 n_3 \\, dS`, $A$ being the liquid-gas surface of the meniscus, $\\vec n$ the associated normal, and $(1,2,3)$ a local basis with $3$ the meniscus orientation (:yref:`ScGeom.normal`). NB: $A$ = 2 :yref:`nn11<CapillaryPhys.nn11>` + :yref:`nn33<CapillaryPhys.nn33>`."))

class Ip2_FrictMat_FrictMat_CapillaryPhys : public IPhysFunctor
	public :
		virtual void go(	const shared_ptr<Material>& b1,
					const shared_ptr<Material>& b2,
					const shared_ptr<Interaction>& interaction);

	YADE_CLASS_BASE_DOC_ATTRS_CTOR(Ip2_FrictMat_FrictMat_CapillaryPhys,IPhysFunctor, "RelationShips to use with :yref:`Law2_ScGeom_CapillaryPhys_Capillarity`.\n\n In these RelationShips all the interaction attributes are computed. \n\n.. warning::\n\tas in the others :yref:`Ip2 functors<IPhysFunctor>`, most of the attributes are computed only once, when the interaction is new.",,;);

Attachment: solveLaplace_uc.m
Description: solveLaplace_uc.m

Attachment: solveLiqBridge.m
Description: solveLiqBridge.m

Attachment: writesCapFile.m
Description: writesCapFile.m

Three .m files are herein provided in order to enable users to build their own 
"capillary files" including capillary bridges data for use with 
Law2_ScGeom_CapillaryPhys_Capillarity engine. Generated capillary files 
consider positiv capillary pressure values and any contact angle or particle 
radius ratio.

A capillary files generation requires launching writesCapFile() (in 
writesCapFile.m) only, after providing a couple of parameters therein (see 
description of writesCapFile.m below). The two other files (solveLiqBridge.m 
and solveLaplace_uc.m) define functions used by writesCapFile() and do not 
require any user input. Specifically, the roles of the three .m files are as 

- solveLiqBridge.m solves the Laplace-Young equation for one given bridge, 
defined in terms of the input attributes of the solveLiqBridge function (see 
therein). The solveLiqBridge function is usually called by other files (see 
below) during capillary files generation, however it can also be executed on 
its own in order to study (e.g. plot) capillary bridge profile.

Code comments include references to:
 * Duriez2016: J. Duriez and R. Wan, Contact angle mechanical influence for wet 
granular soils, currently under Review in Acta Geotechnica
 * Lian1993: G. Lian and C. Thornton and M. J. Adams, A Theoretical Study of 
the Liquid Bridge Forces between Two Rigid Spherical Bodies, Journal of Colloid 
and Interface Science, 161(1), 1993
 * Scholtes2008 (french): L. Scholtes, Modelisation Micro-Mecanique des Milieux 
Granulaires Partiellement Satures, PhD Thesis from Institut polytechnique de 
Grenoble, 2008
 * Soulie2005 (french): F. Soulie, Cohesion par capillarite et comportement 
mecanique de milieux granulaires, PhD Thesis from Universite Montpellier II, 
 * Soulie2006: F. Soulie and F. Cherblanc and M. S. El Youssoufi and C. Saix, 
Influence of liquid bridges on the mechanical behaviour of polydisperse 
granular materials, International Journal for Numerical and Analytical Methods 
in Geomechanics, 30(3), 2006

- solveLaplace_uc.m recursively uses solveLiqBridge in order to compute all 
possible bridges configurations for given contact angle, capillary pressure, 
and particle radius ratio. It is usually called by writesCapFile (see below) 
during capillary files generation, however it can also be executed on its own. 
In particular, it may output text files including bridges data for one given 
capillary pressure.

- writesCapFile.m, finally, is the conductor during the capillary files 
generation, and is the only one that actually requires the user's attention. 
Parameters are to be defined by the user directly in the .m file (from l. 10 to 
27) before launching for data files generation.
Generating a complete set of capillary files typically requires a couple of 
days in terms of computation time.
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to