|
[Sponsors] |
[Other] Writing the old 'positions' file in Lagrangian solvers as of OpenFOAM 5.x |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 13, 2019, 18:04 |
Writing the old 'positions' file in Lagrangian solvers as of OpenFOAM 5.x
|
#1 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
I've seen this asked here on the forum at least a couple of times in the past, but I haven't gone looking for those threads yet.
Essentially the problem is that ever since the barycentric positions were implemented in OpenFOAM-dev and released in OpenFOAM 5.x (OpenFOAM Foundation), it hasn't been possible to load the Lagrangian data into ParaView when using the internal reader, namely with the file extension ".foam", for example if you open the case with this command: Code:
paraFoam -builtin
__________________
|
|
March 4, 2021, 12:06 |
|
#2 | |
Member
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 6 |
Quote:
Hi Bruno, I am facing a problem with your tool (this is the same post I wrote in blueCFD github). I am tryingto use the function with coalChemistryFoam (OF8), so maybe this coalCloud class is not recognised in the script (only MPPIC, colliding, spray and reacting multiphase). But actually this latter is included to form the coalCloud. In my case positions.orig are properly written in processorx/lagrangian/coalCloud1 but when reconstructing they do not reconstruct. Trying to reconstruct and then running postProcess -dict system/positionConvertDict gives me this error: Code:
Executing functionObjects --> FOAM FATAL ERROR: request for kinematicCloud coalCloud1 from objectRegistry region0 failed available objects of type kinematicCloud are 0() From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::kinematicCloud] in file /opt/openfoam8/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211. FOAM aborting |
||
June 17, 2021, 15:42 |
position conversion accuracy
|
#3 |
New Member
Negar Naghash
Join Date: Mar 2017
Posts: 5
Rep Power: 9 |
Hi Bruno,
I am trying to use your function object on OF7 to convert barycentric to old positions for a coaxial nozzle flow. The code has compiled with no error but when I do the postprocessing the conversion moves the particle elsewhere. AS you can see the particles are injected in the core nozzle but in the converted position visualization there are particles in the secondary exhaust. converted.jpg original.jpg So I'm trying to see what causes the deviation from the exact positions. Thanks Negar |
|
November 30, 2021, 22:52 |
|
#4 | |
New Member
Luis Felipe López
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
Quote:
I have the same problem when I want to generate the positions.orig file as post-processing with the sprayFoam solver. It's frustrating because parallelization accelerates my simulations with droplets. I think the program is not detecting the cloud type and using kinematicCloud as default. If anyone knows a solution about this, it would be great, please let us know. Thanks, Luis. |
||
December 3, 2021, 09:41 |
|
#5 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
Is running with one of the openfoam.com versions an option? There you continue to have positions (xyz) and coordinates (barycentric), which makes it simple to post-process in paraview. |
||
December 3, 2021, 10:33 |
|
#6 | |
New Member
Luis Felipe López
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
Quote:
Unfortunately, the server I use and my custom solver are in OF5 (.org), so it would be difficult to change it. Despite this, I solved the problem by adding the following text in file "OpenFOAM-5.x/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C" in these lines: Line 222: Code:
IOField<vector> positions_orig(c.fieldIOobject("positions_orig", IOobject::NO_READ), np); Code:
positions_orig[i] = p.position(); Code:
positions_orig.write(valid); Code:
find -name positions | while read line; do mv $line $line.coord; mv $line_orig $line; done find -name positions | while read line; do sed -i -e 's=^\(.*object.*\)positions_orig;=\1positions;=' $line; done |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 15:30 |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |