|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Join Date: Jun 2011
Posts: 42
Rep Power: 15 ![]() |
Hello,
I have compiled solidParticleFoam solver, which uses solidParticle libraries. Then modified solidParticle library in order to add another dimensionedScalar in particleProperties dictionary. And also modified the solidParticleFoam accordingly. I made the following changes in respective files in the solidParticle library (red color denotes the added code). It compiles without errors. However, when I run the solver, then I get an error, which I believe is about the particleProperties dictionary. What do you think? mySolidParticleCloud.C Code:
Foam::mySolidParticleCloud::mySolidParticleCloud ( const fvMesh& mesh, const word& cloudName, bool readFields ) : Cloud<mySolidParticle>(mesh, cloudName, false), mesh_(mesh), particleProperties_ ( IOobject ( "particleProperties", mesh_.time().constant(), mesh_, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), rhop_(dimensionedScalar(particleProperties_.lookup("rhop")).value()), e_(dimensionedScalar(particleProperties_.lookup("e")).value()), mu_(dimensionedScalar(particleProperties_.lookup("mu")).value()), temp_(dimensionedScalar(particleProperties_.lookup("temp")).value()) { if (readFields) { mySolidParticle::readFields(*this); } } Code:
// Private data const fvMesh& mesh_; IOdictionary particleProperties_; scalar rhop_; scalar e_; scalar mu_; scalar temp_; ... inline scalar rhop() const; inline scalar e() const; inline scalar mu() const; inline scalar temp() const; Code:
inline Foam::scalar Foam::mySolidParticleCloud::rhop() const { return rhop_; } inline Foam::scalar Foam::mySolidParticleCloud::e() const { return e_; } inline Foam::scalar Foam::mySolidParticleCloud::mu() const { return mu_; } inline Foam::scalar Foam::mySolidParticleCloud::temp() const { return temp_; } Code:
FoamFile { version 2.0; format ascii; class dictionary; object particleProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // rhop rhop [ 1 -3 0 0 0 0 0] 1000; e e [ 0 0 0 0 0 0 0] 0.8; mu mu [ 0 0 0 0 0 0 0] 0.2; temp temp [ 0 0 0 1 0 0 0] 283.15; // ************************************************************************* // Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 __dynamic_cast in "/usr/lib/libstdc++.so.6" #4 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const>(Foam::word const&) const in "/opt/openfoam200/platforms/linuxGccDPOpt/lib/libsolidParticle.so" #5 Foam::mySolidParticleCloud::move(Foam::dimensioned<Foam::Vector<double> > const&) in "/home/username/OpenFOAM/username-2.0.0/platforms/linuxGccDPOpt/lib/libmySolidParticle.so" #6 in "/home/username/OpenFOAM/username-2.0.0/platforms/linuxGccDPOpt/bin/mySolidParticleFoam" #7 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #8 in "/home/username/OpenFOAM/username-2.0.0/platforms/linuxGccDPOpt/bin/mySolidParticleFoam" Segmentation fault |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Jun 2011
Posts: 42
Rep Power: 15 ![]() |
Alright, I solved the problem.
After compiling solidParticle library, it seems that in this case I have to compile mySolidParticleFoam, as well. Even if I did not change anything in the solver itself. This confuses me a little because in some cases it works fine even though I don't recompile the solver after making changes in mySolidParticle.C file |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 12 ![]() |
Quote:
Hello! Now I am using solidParticleFoam right now. I have a problem with it. In 0/lagranglan/defaultcloud/d FoamFile { version 2.0; format ascii; class scalarField; location "0"; object d; } 2 ( 2.0e-3 2.0e-3 ) why the diameter doesn't have a unit. If I want to simulation the process in which particle dissolution with a fixed speed. And the diameter becomes small with time. What should I do. Modify solidParticle. C or something else. |
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Paraview - Segmentation fault | grjmell | ParaView | 5 | January 9, 2024 13:14 |
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel | francesco | OpenFOAM Bugs | 4 | May 2, 2017 21:59 |
Segmentation Fault | Shawn_A | OpenFOAM Running, Solving & CFD | 6 | October 31, 2011 14:38 |
forrtl: severe (174): SIGSEGV, segmentation fault occurred | therockyy | FLOW-3D | 7 | January 19, 2011 22:52 |
ParaView segmentation fault only for multiphase | gwierink | OpenFOAM | 9 | March 25, 2010 07:23 |