|
[Sponsors] |
Code creating unreadable characters in solutions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 15, 2020, 21:30 |
Code creating unreadable characters in solutions
|
#1 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 6 |
Hi all,
I am new to openfoam and have been given code for my thesis to edit. It was written for openfoam v5 and I am running the code using openfoam v5. I am using the solver "sprayfoam" and after successful execution of the code, my solutions contain a lot of unreadable or unrecognized characters in the solution (see attached for examples) Note: this issues is only present when there is a nonuniform list of scalars in the solution. The random characters shown in the picture attached continue for hundreds of lines before the code ends resulting in files from 700 kb - 2.2 mb. Let me know if there are any other files you wish to see (controldict, 0 folder, etc), I haven't uploaded any because I have no idea what would be relevant to this issue Thanks so much, Cal |
|
January 15, 2020, 21:36 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 15 |
Hi,
Is your writeFormat set to binary in the controlDict? If you want it to be human readable, then you should set the writeFormat to ascii. Cheers, Antimony |
|
January 15, 2020, 23:23 |
|
#3 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 6 |
Hi Antimony,
Thanks for the reply, yes the format is set to ascii in the controldict do you know of any other possible reasons? Thanks Cal |
|
January 16, 2020, 00:55 |
|
#4 |
Member
Andreas P.
Join Date: May 2017
Posts: 41
Rep Power: 8 |
If you want to change the format of already existing files, you need to execute the "foamFormatConvert" utility.
|
|
January 16, 2020, 01:53 |
|
#5 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 6 |
Hi Andreas,
Thanks for the advice, I will try that on files I already have. But I would like to create new solutions which aren't in this format, do you know hopw I would possibly do this? or do you know what format my solutions are currently in? Thanks |
|
January 16, 2020, 02:06 |
|
#6 |
Member
Andreas P.
Join Date: May 2017
Posts: 41
Rep Power: 8 |
If your controlDict says "ascii" as writeFormat, the solver should create only ascii format files. I tried the aachenBomb tutorial with "writeFormat ascii;" in the controldict and all files that were created are full ascii, so there should be no problem with sprayFoam there.
The header of the file you posted says "binary", so i would assume the writeFormat was set to binary (as it is originaly in the aachenBomb tutorial too). |
|
January 16, 2020, 14:05 |
|
#7 |
Senior Member
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 15 |
Just throwing this out there: is there any particular reason you want to avoid using binary files for writing the solution fields?
Binary files seem to speed up my runs (anecdotal, did not do a benchmark), and take less space on disk. Also, when writing in ASCII some information is lost depending on the write precision, which can impact restarts. If you need to look at a particular field, you can always post-process the binary files. For anyone working with OpenFOAM I would recommend using binary files for output. |
|
January 17, 2020, 03:38 |
|
#8 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28 |
A few points come to mind.
When to use ASCII write format in OpenFOAM?
When not to use ASCII format in OpenFOAM?
|
|
January 23, 2020, 21:18 |
|
#9 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 6 |
Hi all,
Thanks for all the help. I have been able to implement all your suggestions and have discovered that my issue isn't binary/ascii related after all. Thanks so much for sharing your knowledge, it helped a lot! Cal |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Patankar CFD FORTRAN 90 Code FVM | siddiquesil | Main CFD Forum | 19 | October 25, 2022 05:21 |
Problems with Meshing: Collapsed Cells | Emmanuel Resch | Siemens | 1 | July 30, 2007 03:02 |
State of the art in CFD technology | Juan Carlos GARCIA SALAS | Main CFD Forum | 39 | November 1, 1999 14:34 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 11:44 |
What kind of Cmmercial CFD code you feel well? | Lans | Main CFD Forum | 13 | October 27, 1998 10:20 |