|
[Sponsors] |
foamFormatConvert corrupts origId and origProcId |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
|
foamFormatConvert is an OpenFOAM utility to convert a case's simulation results btwn binary and ASCII, depending on what system/controlDict specifies for writeFormat. But in v10 it corrupts the origId and origProcId files.
The problem is fixed by adding a line to call particle::readFields(parcels): Code:
forAll(cloudDirs, i) { fileName dir(cloud::prefix/cloudDirs[i]); Cloud<passiveParticle> parcels(meshPtr(), cloudDirs[i], false); particle::readFields(parcels); // [Bug fix] write origId and origProcId parcels.writeObject ( runTime.writeFormat(), IOstream::currentVersion, runTime.writeCompression(), parcels.size() ); |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 ![]() ![]() |
This has been raised as an issue
https://develop.openfoam.com/Develop.../-/issues/3051 should also be solved now in time for the OpenFOAM-v2312 release. |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 ![]() ![]() |
Quote:
The preferred fixed code: Code:
// OLD: Cloud<passiveParticle> parcels(meshPtr(), cloudDirs[i], false); // NEW - with readFields = true passiveParticleCloud parcels(meshPtr(), cloudDirs[i], true); |
||
![]() |
![]() |
![]() |
|
|