Parabolic velocity profile in OpenFoam 1.6
I have a problem with a customized 3D parabolic BC. I followed all the steps of the Sig Turbomachinery in wiki, but when i try to run the case, an error occurs. The write function is as follows:
void parabolicVelocityFvPatchVectorField::write(Ostream & os) const { fvPatchVectorField::write(os); os.writeKeyword("maxValue") << maxValue_ << token::END_STATEMENT << nl; os.writeKeyword("n") << n_ << token::END_STATEMENT << nl; os.writeKeyword("y") << y_ << token::END_STATEMENT << nl; os.writeKeyword("freq") << f_ << token::END_STATEMENT << nl; os.writeKeyword("phi") << phi_ << token::END_STATEMENT << nl; writeEntry("value", os); } In the 0/U files, i specify the boundary condition as: inlet { type parabolicVelocity; maxValue 0.452; n (0 0 -1); y (0 0 0); freq 0; phi 0; } And when i run the case, the following error occurs: Cannot find 'value' entry on patch entrada of field U in file "./SmeriglioSilviaP/0/U" which is required to set the values of the generic patch field. (Actual type parabolicVelocity) Please add the 'value' entry to the write function of the user-defined boundary-condition or link the boundary-condition into libfoamUtil.so file: ./SmeriglioSilviaP/0/U::boundaryField::entrada from line 35 to line 40. From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch&, const Field<Type>&, const dictionary&) in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 72. FOAM exiting So, i add in 0/U an entry after phi: value uniform (0 0 0); As is sugested in wiki tutorial, and says: FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type parabolicVelocity) on patch entrada of field U in file "./SmeriglioSilviaP/0/U" You are probably trying to solve for a field with a generic boundary condition. From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 782. FOAM exiting Any ideas? I need help! |
Quote:
I ran into a similar error generating a similar boundary condition. I gather you are using Hrv's parabolic velocity patch as a template. My problem was rectified by explicitly specifying the library path. It seemed like the library (despite being located within $FOAM_USER_LIBBIN) was not found. Explicitly specifying the path removed the error. CB P.S. I know the thread is a little old, however, given I found a solution I thought a reply was worth while. |
Chris, thanks for your answer I'm facing the same problem but with Tomasso Lucchini's rampedFixedValue BC. How do you explicitly specify the path? I tried to put it in the controlDict but it was useless...
Thanks in advance. |
controlDict: explicit path
See attached in the code block. I don't know whether it was exactly what my problem was I had just run across something very similar literally an hr before.
Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
Chris, thanks for your quick reply. I tried this way to set the path and it is correct. The problem finally was in another thing and I could manage it. I declared some methods in .H, but hadn't implemented them in .C. Solver had gave me a warning, but it was at the beginning of the output and I was only looking at the end in the FOAM FATAL ERROR. This fatal error was caused by the first one, something like:
--> FOAM Warning : From function dlLibraryTable::open(const fileName& functionLibName) in file db/dlLibraryTable/dlLibraryTable.C at line 79 could not load /home/d/OpenFOAM/d-1.5/lib/linux64GccDPDebug/libconvectiveOutlet.so: undefined symbol: _ZTIN4Foam5token8compoundE Wrong implementation of methods generates misfunction in BCs. Regards. |
Error when trying to use owm RampedFixedValue
Hi
I am trying to make a ramped BC as mentioned above (Tomasso Lucchini's rampedFixedValue BC). It compiles, but when using it in the cavitycase I get this error: Foam::error::printStack(Foam::Ostream&) in "/home/mvdtempe/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" Foam::sigSegv::sigHandler(int) in "/home/mvdtempe/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" Uninterpreted: void Foam::dot<Foam::Vector<double>, Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::inne rProduct<Foam::Vector<double>, Foam::Vector<double> >::type, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/home/mvdtempe/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/icoFoam" at icoFoam.C:0 in "/home/mvdtempe/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/icoFoam" __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" in "/home/mvdtempe/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/icoFoam" Segmentation fault (core dumped) ...? I use 2.1.x |
found it: it was a pointer problem in my BC.C file.
|
All times are GMT -4. The time now is 14:27. |