contact angle + deficit curvature tools

This commit is contained in:
James McClure 2021-12-14 07:07:27 -05:00
parent 011b2f8a87
commit 012c1814c6
2 changed files with 14 additions and 7 deletions

View File

@ -722,9 +722,15 @@ void TwoPhase::ComputeStatic() {
imin = jmin = 1; imin = jmin = 1;
/* set fluid isovalue to "grow" NWP for contact angle measurement */ /* set fluid isovalue to "grow" NWP for contact angle measurement */
fluid_isovalue = -1.5; fluid_isovalue = -1.0;
FILE *ANGLES = fopen("ContactAngle.csv", "a"); string FILENAME = "ContactAngle";
char LocalRankString[8];
char LocalRankFilename[40];
sprintf(LocalRankString, "%05d", Dm->rank());
sprintf(LocalRankFilename, "%s%s%s", "ContactAngle.", LocalRankString,".csv");
FILE *ANGLES = fopen(LocalRankFilename, "a+");
fprintf(ANGLES,"x y z angle\n"); fprintf(ANGLES,"x y z angle\n");
for (k = kmin; k < kmax; k++) { for (k = kmin; k < kmax; k++) {
@ -1476,14 +1482,14 @@ void TwoPhase::Reduce() {
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
Gwn_global(i) /= awn_global; Gwn_global(i) /= awn_global;
} }
*/
if (lwns_global > 0.0) { if (lwns_global > 0.0) {
efawns_global /= lwns_global; efawns_global /= lwns_global;
KNwns_global /= lwns_global; //KNwns_global /= lwns_global;
KGwns_global /= lwns_global; //KGwns_global /= lwns_global;
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
vawns_global(i) /= lwns_global; vawns_global(i) /= lwns_global;
} }
*/
if (trawn_global > 0.0) { if (trawn_global > 0.0) {
trJwn_global /= trawn_global; trJwn_global /= trawn_global;
trRwn_global /= trawn_global; trRwn_global /= trawn_global;

View File

@ -4573,12 +4573,13 @@ inline void pmmc_CurveCurvature(DoubleArray &f, DoubleArray &s,
nwsy /= norm; nwsy /= norm;
nwsz /= norm; nwsz /= norm;
if (nsx * nwnsx + nsy * nwnsy + nsz * nwnsz < 0.0) { /* JM does not remember why we should do this...
* if (nsx * nwnsx + nsy * nwnsy + nsz * nwnsz < 0.0) {
nwnsx = -nwnsx; nwnsx = -nwnsx;
nwnsy = -nwnsy; nwnsy = -nwnsy;
nwnsz = -nwnsz; nwnsz = -nwnsz;
} }
*/
// common curve normal in the fluid surface tangent plane (rel. geodesic curvature) // common curve normal in the fluid surface tangent plane (rel. geodesic curvature)
nwnx = twnsy * nwz - twnsz * nwy; nwnx = twnsy * nwz - twnsz * nwy;
nwny = twnsz * nwx - twnsx * nwz; nwny = twnsz * nwx - twnsx * nwz;