|
[Sponsors] |
Code creating unreadable characters in solutions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 15, 2020, 22:30 |
Code creating unreadable characters in solutions
|
#1 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 7 |
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, 22:36 |
|
#2 |
Senior Member
Join Date: Aug 2013
Posts: 407
Rep Power: 16 |
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 16, 2020, 00:23 |
|
#3 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 7 |
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, 01:55 |
|
#4 |
Member
Andreas P.
Join Date: May 2017
Posts: 41
Rep Power: 9 |
If you want to change the format of already existing files, you need to execute the "foamFormatConvert" utility.
|
|
January 16, 2020, 02:53 |
|
#5 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 7 |
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, 03:06 |
|
#6 |
Member
Andreas P.
Join Date: May 2017
Posts: 41
Rep Power: 9 |
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, 15:05 |
|
#7 |
Senior Member
Adhiraj
Join Date: Sep 2010
Location: Karnataka, India
Posts: 187
Rep Power: 16 |
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, 04:38 |
|
#8 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
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, 22:18 |
|
#9 |
New Member
Calvin
Join Date: Nov 2019
Posts: 13
Rep Power: 7 |
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 |
|
June 3, 2024, 08:11 |
|
#10 | |
New Member
Adriana Pinto
Join Date: Nov 2023
Posts: 2
Rep Power: 0 |
Quote:
Thank you for your attention. |
||
June 3, 2024, 10:24 |
|
#11 | |
Member
Pedro Gouveia
Join Date: Oct 2022
Location: Portugal
Posts: 64
Rep Power: 4 |
Quote:
Hello Adriana and Cal. I am having a similar problem. For context, my university lab bought a desktop with a intel 9 13 serioes CPU, and openfoam, when using the decomposePar command, inserts unreadable characters in random files. For instance, sometimes it creates unreadable characters in the processorX/constant/ files (can be in faces, points, etc), sometimes it creates in the processorX/timestep/p,U,k,omega,nut files, and I can not reconstructPar. It is sad because we get the most out of the CPU when using all the cores, and not running in a single core. If someone has any idea, please let me know. It literally writes the code in ascii but in some lines it inserts characters such as &, and unreadable characters as you can see in the attached image. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Patankar CFD FORTRAN 90 Code FVM | siddiquesil | Main CFD Forum | 19 | October 25, 2022 06:21 |
Problems with Meshing: Collapsed Cells | Emmanuel Resch | Siemens | 1 | July 30, 2007 04:02 |
State of the art in CFD technology | Juan Carlos GARCIA SALAS | Main CFD Forum | 39 | November 1, 1999 15:34 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 12:44 |
What kind of Cmmercial CFD code you feel well? | Lans | Main CFD Forum | 13 | October 27, 1998 11:20 |