|
[Sponsors] |
IOobject only retrieves field data at writeInterval |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 1, 2022, 10:33 |
IOobject only retrieves field data at writeInterval
|
#1 | |
New Member
Carl Dahmen
Join Date: Jan 2022
Posts: 6
Rep Power: 4 |
Hello Foamer!
I work with CFDEM but my question is purely OpenFOAM. I have modified the Smagorinsky turbulence model to create a subgrid viscosity depending on the field voidfraction (Vgas/Vsolid). My problem is after the first timestep "0" I get the error message: Quote:
Code:
template<class BasicTurbulenceModel> tmp<volScalarField> BatchelorGreen<BasicTurbulenceModel>::k ( const tmp<volScalarField>& voidfrac ) const { volScalarField solidfrac(scalar(1)-voidfrac); volScalarField c1(a_*solidfrac+b_*sqr(solidfrac)); return tmp<volScalarField> ( new volScalarField ( IOobject ( IOobject::groupName("k", this->U_.group()), this->runTime_.timeName(), this->mesh_ ), c1 ) ); } template<class BasicTurbulenceModel> void BatchelorGreen<BasicTurbulenceModel>::correctNut() { new volScalarField ( IOobject ( "voidfraction", this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ_IF_MODIFIED ), this->mesh_ ); volScalarField k(this->k(voidfraction_)); this->nut_ = this->nu()*k; fv::options::New(this->mesh_).correct(this->nut_); BasicTurbulenceModel::correctNut(); } |
||
Tags |
cfdem, ioobject, runtime, smagorinsky, subgrid |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
[OpenFOAM] How to get the coordinates of velocity data at all cells and at all times | vidyadhar | ParaView | 9 | May 20, 2020 21:06 |
[swak4Foam] swakExpression not writing to log | alexfells | OpenFOAM Community Contributions | 3 | March 16, 2020 19:19 |
External magnetic field data | Richard Lee | FLUENT | 7 | January 11, 2019 05:43 |
UDF value to large for defined data type | Anna73 | Fluent UDF and Scheme Programming | 9 | September 30, 2018 23:18 |