如何让injectionModels在每一个时间步都读取kinematicLookupTableInjection
-
大家好,
我在做一个欧拉-拉格朗日模拟,想请问一下如何让injectionModels在每一个时间步都读取kinematicLookupTableInjection里的数据?在我的代码里现在能做到把每个时间步想要射入的粒子都写入kinematicLookupTableInjection,但是injectionModels只会初始化的时候读取一次,而我在lookuptable里更新的数据都不会再读取了。
有没有大佬知道如何做到呢?万分感激!
-
@jasper-0 更新一下目前进度,我尝试在KinematicLookupTableInjection.C里将injectors_设置为MUST_READ_IF_MODIFIED,
template<class CloudType> Foam::KinematicLookupTableInjection<CloudType>::KinematicLookupTableInjection ( const dictionary& dict, CloudType& owner, const word& modelName ) : InjectionModel<CloudType>(dict, owner, modelName, typeName), inputFileName_(this->coeffDict().lookup("inputFile")), duration_(this->coeffDict().getScalar("duration")), parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), randomise_(this->coeffDict().getBool("randomise")), injectors_ ( IOobject ( inputFileName_, owner.db().time().constant(), owner.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ),
但是在运行solver的时候提示不支持自动重新读取,有没有大佬知道这种情况咋解决呢?
GlobalIOList<kinematicParcelInjectionData> kinematicLookupTableInjection constructed with IOobject::MUST_READ_IF_MODIFIED but GlobalIOList<kinematicParcelInjectionData> does not support automatic rereading.
2022年12月26日 19:59
2/2
2023年1月13日 21:25