|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Join Date: Feb 2019
Posts: 23
Rep Power: 8 ![]() |
Hello all,
I'm trying to develop my own solver based in interFoam but I'm stucked at the interfaceProperties.C file. I think that I understand almost the whole file but after the calculation of the normal interface vector nHatp, the alpha gradient is corrected as Code:
acap.gradient()=(nf&nHatp)*mag(gradlAlphaf[patchi]) First af all I set the limit entry in the alpha.water dictionary to none and If I modify this last gradient correction expression, for example setting it up to 0, it is interpreted by the code as if the dot product (nf&nHatp) were equal to 0, i.e. the angle is 90º, wich is consistent. But if I simply remove this line from the code, the effect in the calculations is the same as in the last case: the gradient of alpha is equal to 0. So I haven't been able to override this correction step to get just the gradient of alpha calculated (notice that if you just let acap.gradient()=mag(gradlAlphaf[patchi]) it would mean that (nf&nHatp)=1 and therofore the angle would be 0º). With the aim to avoid this, I tried to modify the following constructor in the alphaContactAnglePatchScalarField.C file Code:
Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
fixedGradientFvPatchScalarField(p, iF),
limit_(limitControlNames_.read(dict.lookup("limit")))
{
if (dict.found("gradient"))
{
gradient() = scalarField("gradient", dict, p.size());
fixedGradientFvPatchScalarField::updateCoeffs();
fixedGradientFvPatchScalarField::evaluate();
}
else
{
fvPatchField<scalar>::operator=(patchInternalField());
gradient() = 0.0;
}
}
So I haven't been able to understand how this implementation of the alpha gradient works. I hope you can shed light on this matter. Regards. Last edited by dolfus; November 29, 2019 at 07:24. Reason: Gramatic error |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Sep 2019
Posts: 18
Rep Power: 8 ![]() |
Hi dolfus,
Do you have any ideas on what is the alpha gradient for ? I am also puzzled by this code. |
|
|
|
|
|
![]() |
| Tags |
| boundary, gradient calculation, interfoam |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Periodic flow using Cyclic - comparison with Fluent | nusivares | OpenFOAM Running, Solving & CFD | 30 | December 12, 2017 06:35 |
| Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
| Boundary conditions for Boundary layer + pressure gradient | Obad | Main CFD Forum | 0 | May 2, 2015 04:20 |
| An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
| [Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |