|
[Sponsors] |
how is the interface normal on boundary corrected by "correctContactAngle" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 16, 2016, 13:27 |
how is the interface normal on boundary corrected by "correctContactAngle"
|
#1 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hello Foamers;
I have a question regarding a library (interfaceProperties.C) used by the interFOAM solver. There is a private member function names "correctContactAngle". Can anyone throw some light on how the interface normal on the boundary is being corrected. I can follow up-to certain portion of the function which I commented and few transformations at the end of the function look confusing. Code:
void Foam::interfaceProperties::correctContactAngle ( surfaceVectorField::GeometricBoundaryField& nHatb /*we pass the interface normal vector in patches*/ ) const { const fvMesh& mesh = alpha1_.mesh(); const volScalarField::GeometricBoundaryField& gbf = alpha1_.boundaryField(); const fvBoundaryMesh& boundary = mesh.boundary(); forAll(boundary, patchi) { if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi])) { const alphaContactAngleFvPatchScalarField& gcap = refCast<const alphaContactAngleFvPatchScalarField> (gbf[patchi]); fvsPatchVectorField& nHatp = nHatb[patchi]; scalarField theta = convertToRad*gcap.theta(U_.boundaryField()[patchi], nHatp); vectorField nf = boundary[patchi].nf(); /*is the face normal vector on a patch*/ // Reset nHatp to correspond to the contact angle scalarField a12 = nHatp & nf; /*should be a surface scalar field*/ scalarField b1 = cos(theta); scalarField b2(nHatp.size()); /* how does the following part correct the interface normal vector on the patches?*/ forAll(b2, facei) { b2[facei] = cos(acos(a12[facei]) - theta[facei]); } scalarField det = 1.0 - a12*a12; scalarField a = (b1 - a12*b2)/det; scalarField b = (b2 - a12*b1)/det; nHatp = a*nf + b*nHatp; nHatp /= (mag(nHatp) + deltaN_.value()); } } } |
|
November 16, 2016, 17:49 |
|
#2 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
Hi Saideep!
Look at page 49 and 50 of the PDF https://pangea.stanford.edu/ERE/pdf/...veleau2016.pdf Cheers, |
|
June 16, 2017, 14:27 |
acap.gradient()
|
#3 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Cyprien and Foamers;
In the void correctContactAngle function of interfaceProperties, what does the acap.gradient() do? Code:
acap.gradient() = (nf & nHatp)*mag(gradAlphaf[patchi]); acap.evaluate(); I am not sure how, but it looks like it re-orient the interface normal on the contact angle boundaries further after correcting the interface normal vector. SaiD |
|
December 13, 2018, 10:06 |
|
#4 | |
Member
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11 |
Hi Saideep,
Were you able to figure this out? Best regards Quote:
|
||
Tags |
contact angle, interfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Floating point exception: Zero divide | liladhar | CFX | 11 | December 16, 2013 05:07 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
CFX13 Post Periodic interface | EtaEta | CFX | 7 | December 8, 2011 18:15 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |