------------------------------------------------------------
revno: 3936
committer: jduriez <jerome.dur...@ucalgary.ca>
timestamp: Wed 2016-09-21 14:32:36 -0600
message:
  Typo and minor corrections of previous capillary commit
modified:
  examples/capillaryLaplaceYoung/README.txt
  examples/capillaryLaplaceYoung/writesCapFile.m


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to 
https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'examples/capillaryLaplaceYoung/README.txt'
--- examples/capillaryLaplaceYoung/README.txt	2016-09-21 16:48:23 +0000
+++ examples/capillaryLaplaceYoung/README.txt	2016-09-21 20:32:36 +0000
@@ -15,7 +15,7 @@
 
 As explained on the wiki page (see above) and in Law2_ScGeom_CapillaryPhys_Capillarity doc, so-called capillary files are required in order to use Law2_ScGeom_CapillaryPhys_Capillarity engine. These capillary files include capillary bridges configurations data (for positiv capillary pressure values). A version of capillary files can be downloaded from the wiki page, they consider a zero contact (wetting) angle and some given particle radius ratio.
 
-Also, three .m files are herein provided in order to enable users to build their own capillary files for any contact angle or particle radius ratio, or to study capillary bridges such as such (solveLiqBridge.m). 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 follows:
+Also, three .m files are herein provided in order to enable users to build their own capillary files for any contact angle or particle radius ratio, or to study capillary bridges as such (solveLiqBridge.m). 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 follows:
 
 
 - 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.
@@ -31,5 +31,5 @@
 - solveLaplace_uc.m calls several times 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 for such task. Parameters are to be defined by the user directly in the .m file (from l. 10 to 30) before launching for data files generation.
-  Generating a complete set of 10 capillary files typically requires few days in terms of computation time with MATLAB and much (~ 7*) more with Octave. The .m files makes wide use of iterative procedure and a greater performance for MATLAB is indeed expected. In case Octave is still chosen for generation, you may want uncomment some Octave specific command ('fflush(..)') in writesCapFile.m in order for the terminal to update you on the progress.
+- writesCapFile.m, finally, is the conductor during the capillary files generation, and is the only one that actually requires the user's attention for such task. Parameters are to be defined by the user directly in the .m file (from l. 10 to 30) before launching.
+  Generating a complete set of 10 capillary files typically requires few days in terms of computation time with MATLAB and much (~ 7*) more with Octave. The .m files makes wide use of iterative procedures and a greater performance for MATLAB is indeed expected. In case Octave is still chosen for generation, you may want to uncomment some Octave specific command ('fflush(..)') in writesCapFile.m in order for the terminal to update you on the progress.

=== modified file 'examples/capillaryLaplaceYoung/writesCapFile.m'
--- examples/capillaryLaplaceYoung/writesCapFile.m	2016-09-21 16:48:23 +0000
+++ examples/capillaryLaplaceYoung/writesCapFile.m	2016-09-21 20:32:36 +0000
@@ -55,7 +55,7 @@
 % ##### Preliminary A: find maxD values #####
 % It is considered to be for zero suction (corresponds ~ to Scholtes' data)
 % And assumed to occur for delta1 greater than 15 deg (> 30 deg in Scholtes)
-    disp('Search for maximum distance starting')
+    fprintf(['\nFor r = ',num2str(rRatio),', starting search for maximum distance\n'])
 %     fflush(stdout); % Octave command for flush display
     d1here = 15:0.5:90-theta; % I got the exact same results with 15:1:90 or 15:0.2:90
     data = solveLaplace_uc(theta,rRatio,0,d1here,deltaZ,0);
@@ -197,12 +197,14 @@
 
 dataGreaterDist = bigData(bigData(:,1)>= dist,:);
 
-if isempty(dataGreaterDist)
-    % this should never happen: bigData includes all cases uc=0, and dist =
-    % maxD (the worst case) is one of them
+if isempty(dataGreaterDist) % may happen for maxD, see for instance delta1 
+    % increment = 0.5 for maxD determination (with uc*=0), vs possibly 
+    % another value for computing bigData
     outData = [];
-    out='\nUnexpected behavior obtained during interpolate function for dist =';
-    fprintf([out,num2str(dist),'. Please give a look..\n']);
+    out = '\nWARNING: Reaching the last distance value was not possible here. Before use in YADE, you need to';
+    out = [out,' modify by hand the 2d line (where nValDist appears) of this capillary file:\n'];
+    out = [out,'Just substract 1 to the nValDist value appearing therein\n'];
+    fprintf([out,'Sorry about that..\n\n']);
     return
 end
 maxUc_dist = max(dataGreaterDist(:,2));
@@ -241,12 +243,11 @@
 if size(data_dist,1) > nValUcOK
     error('Problem here !')
 end
-if size(data_dist,1) == 0
-    % may happen for dist = maxD
-   out = '\nWARNING: Reaching the last distance value was not possible here. Before use in YADE, you need to';
-   out = [out,' modify by hand the 2d line (where nValDist appears) of this capillary file:\n'];
-   out = [out,'Just substract 1 to the nValDist value appearing therein\n'];
-   fprintf([out,'Sorry about that..\n\n']);
+if size(data_dist,1) == 0 % may happen for dist = maxD
+    out = '\nWARNING: Reaching the last distance value was not possible here. Before use in YADE, you need to';
+    out = [out,' modify by hand the 2d line (where nValDist appears) of this capillary file:\n'];
+    out = [out,'Just substract 1 to the nValDist value appearing therein\n'];
+    fprintf([out,'Sorry about that..\n\n']);
 end
 
 outData = [nValUcOK 0 0 0 0 0 0 0;data_dist];

_______________________________________________
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