Skip to content

NickJaensson/tensiomet2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tensiomet2

This Matlab library is used to generate pendant drop shapes by solving the Young-Laplace equation using a spectral method. Both simple interfaces (only surface tension) and elastic interfaces can be simulated. Moreover, both forward as well as inverse analyses can be performed.

The code is based on the TensioMet code of M. Nagel (http://tensiomet.sourceforge.net) and it was adapted by N. Jaensson. It requires the Chebfun library (https://www.chebfun.org) to be installed in the same directory, or one directory above.

Usage

To initialize, set all the paths by running set_paths.m from the project directory (gen-pendant-drop/). Example scripts are available in the examples/ directory.

There are generally four ways of using the software:

  1. Forward problem for a simple interface: example_simple.m
  2. Forward problem for an elastic interface: example_elastic.m
  3. Inverse problem for simple interface (tensiometry): example_simple_inverse.m
  4. Inverse problem for an elastic interface (elastometry): example_elastic_inverse.m

Details on the numerical implementation can be found here: XXX. Here, we list the most important Matlab structures that are used in the code.

Simple interface forward (example_simple.m)

To solve for a drop with a simple interface, we use a numerical domained (s0) and a solution domain (s).

Input

  • params_num: numerical parameters, with N the number of grid points for discretization, and eps_fw_simple the convergence criterion.
  • params_phys: the physical parameters (basically the input parameters of the Young-Laplace equation with a volume constraint). The values of Wo and area0 are calculated when the code is executed.

Output:

  • vars_num: numerical variables: differentation/integration matrices. When 0 is in the name they are defined w.r.t. s0. When s is in the name they are defined w.r.t. s. The values of C and N are copied from vars_sol and params_num, respectively.
  • vars_sol: solution variables, such as the nodal values of r and z. Also C is stored here, which is the factor between numerical and solution domain C=s0/s.

Simple interface inverse (example_simple_inverse.m)

The inverse problem assumes that the points on the boundary of the drop are found. In the example example_simple_inverse.m, the points are generated by the forward problem followed by addin Gaussian noise normal to the boundary. The points are fitted using Chebyshev polynomials and from that, the surface tension and pressure values are found through an optimization procedure.

Input:

  • Points on the boundary

Output:

  • vars_num_fit: the numerical grid obtained from the image analysis. NOTE: here C is equal to 1 since the domain length is fixed by the image (more accurately: fixed by the fitted Chebyshev shape).
  • vars_sol_fit: nodal numerical shape variables from the fitted Chebyshev shape , such as the nodal values of r and z.
  • When calling solve_inverse_young_laplace, the optimized surface tension, pressure and r- and z- coordinates of the optimized shape are returned.

Elastic interface forward (example_elastic.m)

To solve for a drop with an elastic interface, besides the numerical domain, two physical states are needed: an undeformed state and the deformed state. The undeformed state is basically the same as the simple interface case. The deformed state is obtained by either imposing a compression/expansion of the volume or the of the surface area. We use a numerical domained (s0), an undeformed domain (s* or sstar) and a deformed solution domain (s).

Input:

  • params_num: similar to the simple problem, but with additional parameters specific to the elastic case.
  • params_phys: similar to the simple problem, but with additional parameters specific to the elastic case.

Output:

  • vars_num_ref: similar to the simple interface case. This refers to the undeformed reference state for the elasic problem.
  • vars_sol_ref: similar to the simple interface case. This refers to the undeformed reference state for the elasic problem.
  • vars_num: numerical variables now on the deformed state.
  • vars_sol: solution variables now on the deformed state.

NOTE: in vars_num_ref and vars_sol_ref we use the variables s0 to refer to the numerical domain and s to refer to the (undeformed) solution domain. In vars_num and vars_solwe use the variables s0 to refer to the numerical domain, s*/sstar to refer to the reference domain and s to refer to the deformed solution domain.

Elastic interface inverse (example_elastic_inverse.m)

Similar to the simple inverse case, the elastic inverse case assumes that the points on the boundary of the drop are found. Note that we now need to find two sets of points: one for the undeformed state and one for the deformed state. In the example example_elastic_inverse.m, the points are generated by the forward problem followed by addin Gaussian noise normal to the boundary. The points are fitted using Chebyshev polynomials, on both the undeformed state and the deformed state. The meridional and circumferential surface stresses are found using Capillary Meniscus Dynanometry method (Danov et al. Advances in Colloid and Interface Science 233 (2016)). From that, the elastic moduli values are found through an optimization procedure.

Input:

  • Points on the boundary in both the reference state and deformed state

Output:

  • vars_num_ref_fit: similar to the simple interface inverse case.
  • vars_sol_ref_fit: similar to the simple interface inverse case.
  • vars_num_fit: similar to the simple interface inverse case.
  • vars_sol_fit: similar to the simple interface inverse case, but now optimized assuming an elastic interface and including the stresses found by the CMD method.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages