|
[Sponsors] |
March 18, 2019, 11:55 |
Adding List to kinematicParcel
|
#1 |
Member
Joaquín Neira
Join Date: Oct 2017
Posts: 38
Rep Power: 9 |
Hello!,
I'm working on a lagrangian project in which I need to add a List member to kinematicParcel. This list is of type List<tuple2<scalar, vector>> : KinematicParcel.H Code:
... // Basset //- storage of dt [s] and Ur [m/s] List<Tuple2<scalar, vector>> BassetList_; ... Code:
... if ( p.age() <= td.cloud().constProps().dtB()*(td.cloud().constProps().NB() + 1) ) { p.BassetList().resize(p.BassetList().size() + 1); } // rota la lista: el mas reciente se ubicara al principio inplaceRotateList(p.BassetList(), 1); p.BassetList().first().first() = dt; p.BassetList().first().second() = p.Uc() - p.U(); ... In file KinematicParcelIO.C, i have: Code:
... // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template<class ParcelType> Foam::string Foam::KinematicParcel<ParcelType>::propertyList_ = Foam::KinematicParcel<ParcelType>::propertyList(); template<class ParcelType> const std::size_t Foam::KinematicParcel<ParcelType>::sizeofFields_ ( offsetof(KinematicParcel<ParcelType>, BassetList_) - offsetof(KinematicParcel<ParcelType>, active_) ); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class ParcelType> Foam::KinematicParcel<ParcelType>::KinematicParcel ( const polyMesh& mesh, Istream& is, bool readFields ) : ParcelType(mesh, is, readFields), active_(false), typeId_(0), nParticle_(0.0), d_(0.0), dTarget_(0.0), U_(Zero), rho_(0.0), age_(0.0), tTurb_(0.0), UTurb_(Zero), BassetList_(), rhoc_(0.0), Uc_(Zero), muc_(0.0), curlUc_(Zero) ... The problem is that when I run my case with just 50 particles, I get a memory error (running on cluster) after a second of simulation |
|
Tags |
lagrangian, list, memory error |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 22:53 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |