|
[Sponsors] |
March 25, 2020, 12:17 |
MembraneFOAM RO BC warning
|
#1 |
New Member
Join Date: Mar 2020
Posts: 2
Rep Power: 0 |
Hello everyone,
I'm trying to use the reverse osmosis boundary condition from MembraneFOAM, but I'm getting a warning when compiling. I'm using OpenFOAM v1912, and I dl the branch OF5 from MembraneFOAM git, available here, as suggested in a previous thread. I already did some changes : - syntax of writeIfDifferent function, which I copy-pasted from another BC (something like writeIfDifferent<word>( os , ... ) became os.writeIfDifferent<word>( ... ) ) - deleted the reference to the triSurface lib (because it's not in src anymore, I'll try with a dummy case see if it's a problem) - deleted the fm_ attribute and the calcFaceMapping() function. This is because I would like to use it as a boundary, and not a baffle. I essentially need the RO BC, so that's where we'll stick for now (except if something else is needed). So I want to compile the RO BC (sources files are attached), and I get a warning related to each constructor, as following : Code:
RO_BC/explicitROmembraneSolute/explicitROmembraneSoluteFvPatchScalarField.C:136:18: warning: ‘Foam::dimensioned<Type>::dimensioned(Foam::Istream&) [with Type = double]’ is deprecated: Since 2018-11 [-Wdeprecated-declarations] GBC_(p.size()) ^ In file included from /home/leo/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/dimensionedType.H:565:0, from /home/leo/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/DimensionedField.H:46, from /home/leo/OpenFOAM/OpenFOAM-v1912/src/finiteVolume/lnInclude/fvPatchField.H:51, from RO_BC/explicitROmembraneSolute/explicitROmembraneSoluteFvPatchScalarField.H:65, from RO_BC/explicitROmembraneSolute/explicitROmembraneSoluteFvPatchScalarField.C:27: /home/leo/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/dimensionedType.C:275:1: note: declared here Foam::dimensioned<Type>::dimensioned(Istream& is) ^~~~ Code:
//- gradientBoundaryCoefficients Field<scalar> GBC_; Code:
explicitROmembraneSoluteFvPatchScalarField::explicitROmembraneSoluteFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const dictionary& dict ) : fvPatchField<scalar>(p, iF), transProps_ ( IOobject ( "transportProperties", this->db().time().constant(), this->db(), IOobject::MUST_READ, IOobject::NO_WRITE, true ) ), UName_(dict.lookupOrDefault<word>("U", "U")), R_(readScalar(dict.lookup("R"))), D_AB_Min_(transProps_.lookup("D_AB_Min")), D_AB_Coeff_(transProps_.lookup("D_AB_Coeff")), D_AB_mACoeff_(transProps_.lookup("D_AB_mACoeff")), rho0_(transProps_.lookup("rho0")), rho_mACoeff_(transProps_.lookup("rho_mACoeff")), VIC_(p.size()), VBC_(p.size()), GIC_(p.size()), GBC_(p.size()) { if (dict.found("value")) { fvPatchField<scalar>::operator= ( scalarField("value", dict, p.size()) ); } else { // initialise the field to 0.0 if no information is given fvPatchField<scalar>::operator=(pTraits<scalar>::zero); } } Even if it's not a critical problem (I can compile) I would be interested to correct this, and my very basic knowledge of C++ doesn't allow me to do so. Thank you in advance for your help! Léo |
|
March 26, 2020, 05:23 |
|
#2 |
Senior Member
|
Hi,
If fact the warning is about these lines: Code:
D_AB_Min_(transProps_.lookup("D_AB_Min")), D_AB_Coeff_(transProps_.lookup("D_AB_Coeff")), D_AB_mACoeff_(transProps_.lookup("D_AB_mACoeff")), rho0_(transProps_.lookup("rho0")), rho_mACoeff_(transProps_.lookup("rho_mACoeff")), Code:
D_AB_Min_("D_AB_Min", transProps_), ... |
|
March 26, 2020, 05:41 |
|
#3 |
New Member
Join Date: Mar 2020
Posts: 2
Rep Power: 0 |
Indeed, it works!
Thank you very much for your help! For anyone passing by, I might commit these change to MembraneFoam in the future! Léo |
|
Tags |
boundary condition, membrane, programming, reverse osmosis |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Caffa 3D code | Waliur Rahman | Main CFD Forum | 0 | May 29, 2018 01:53 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 11:20 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 07:59 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |