The effect of write precision on CFD solution with codeStream
Hi,
Following my previous post, https://www.cfd-online.com/Forums/op...operators.html, I met another "funny" thing. I am new to OF and did not find this information anywhere so I decided to share it. I am using OF2106. If one is using codeStream/setExprField, and I guess coded boundaries conditions. The writePrecision parameter in controlDict can have some significance! I have the following codestream code for defining the internalField in p: Code:
Code:
Code:
const scalarField& V = mesh.V(); |
You need to adjust your expectations and/or find another way to handle the problem. The codeStream bits work by outputting to StringStream and then reparsing that to get tokens to populate the dictionary contents. These are the tokens that are actually used to populate the field.
Yes, you are correct to think that this sounds ugly! |
Hi,
I just found this out too after a week plus of debugging. Besides increasing precision for writePrecision and maybe timePrecision, there may also be a need to increase the read/write precision for reading/writing files: Code:
while(MyReadFile.good() && (getline(MyReadFile, line))) |
All times are GMT -4. The time now is 00:01. |