|
[Sponsors] |
February 25, 2021, 06:22 |
symmetryPlane coefficients in OpenFOAM/FOAM
|
#1 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34 |
Hello FOAMers!
I have been looking at the symmetry plane implementation in OpenFOAM/FOAM and am struggling to understand how the gradientInternalCoeffs were derived i.e. the matrix coefficients related to the diffusion term. In particular for vectors. In all main forks of OpenFOAM, the symmetryPlane internal coefficients (gradientInternalCoeffs) are calculated as (in transformFvPatchField.C): Code:
template<class Type> tmp<Field<Type> > transformFvPatchField<Type>::gradientInternalCoeffs() const { return -this->patch().deltaCoeffs()*this->snGradTransformDiag(); } Code:
tmp<Field<Type> > basicSymmetryFvPatchField<Type>::snGradTransformDiag() const { vectorField nHat = this->patch().nf(); vectorField diag(nHat.size()); diag.replace(vector::X, mag(nHat.component(vector::X))); diag.replace(vector::Y, mag(nHat.component(vector::Y))); diag.replace(vector::Z, mag(nHat.component(vector::Z))); return transformFieldMask<Type>(pow<vector, pTraits<Type>::rank>(diag)); } From this I can see that the internal coefficients for a vector field will be (when I also include gammaMagS assuming a scalar gamma): Which can equivalently be written as (allows easier comparison with what comes below): It is not clear where the mag(n_i) comes from here. Moukalled, Mangani and Darwish (http://dx.doi.org/10.1080/10407790.2016.1138748) say it should be: Notice that Foam replaced one of the mag(S_i) with mag(S) which boosts the coefficient. This does not make a difference when the symmetry plane is aligned with a Cartesian plane but they will give different convergence otherwise. Of course if outer corrections are performed, the value of this coefficient does not directly affect the answer but just the convergence. From some quick checks, the Foam version seems to give faster convergence for vector problems but it is not clear where it came from. Maybe somebody can comment or share related references. Thanks! Philip |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2DOF Planning hull resistance study with overset | CFD_fan | OpenFOAM Running, Solving & CFD | 7 | July 13, 2021 05:03 |
Trying to convert a case from laminar to turbulent (K-OmegaSST) | EternalSeekerX | OpenFOAM Running, Solving & CFD | 7 | November 1, 2020 16:16 |
turbulent velocity inlet and negative drag coefficients | Isaiah_HZ | OpenFOAM Running, Solving & CFD | 1 | September 25, 2020 12:04 |
Antoine Equation coefficients for water | Ludwig Prandtl | CFX | 2 | June 27, 2017 23:24 |
Divergent temperature in chtMultiRegion(Simple)Foam | akrasemann | OpenFOAM Running, Solving & CFD | 13 | March 24, 2014 02:54 |