CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   blockMesh - no spellcheck at convertToMeters; (https://www.cfd-online.com/Forums/openfoam-bugs/144797-blockmesh-no-spellcheck-converttometers.html)

seav November 21, 2014 14:03

blockMesh - no spellcheck at convertToMeters;
 
Hello.

Today I've sadly discovered there is no spellcheck at function convertToMeters; in blockMeshDict dictionary file.

BlockMesh just read it anyway without any error or information.
ex. converToMeters 0.001; will be read by blockMesh and it wont be actually converted to 0.001 scale.

...otherwise convertToMeters 0.001; will be read too but it will convert to correct scale.

This is in my opinion an error which can give very very bad informations. And can make confusions especially with new users.

Cheers.
seav

hjasak November 22, 2014 16:07

Do you have any ideas on how to actually implement this?

seav November 22, 2014 17:11

Hello Mr Jasak,

In my opinion simple spellcheck a phrase "convertToMeters" before blockMesh does his job should be enough. If the phrase is correct blockMesh should go on and if its not should crash with an error.

Sadly admit, I am not skilled with OpenFOAM programing to give source code.

Cheers,
seav.

alexeym November 22, 2014 17:15

Well ;) guess it's a test, change

Code:

    // optional 'convertToMeters' or 'scale'  scaling factor
    if (!meshDescription.readIfPresent("convertToMeters", scaleFactor_))
    {
        meshDescription.readIfPresent("scale", scaleFactor_);
    }

to more strict calls.

wyldckat January 3, 2015 06:24

Greetings to all!

This feature request has now been posted at the following locations:
Best regards,
Bruno

seav January 3, 2015 06:49

Hi,

Thank you for replay.

Cheers,
seav

derekm January 3, 2015 14:18

if you change the first character t of converttToMeters o a capital C you get an access violation... took a wee while to work that one out.

wyldckat January 3, 2015 15:08

Quote:

Originally Posted by derekm (Post 526009)
if you change the first character t of converttToMeters o a capital C you get an access violation... took a wee while to work that one out.

:confused: I'm unable to reproduce that error. I've tried with OpenFOAM 2.3, 2.1, foam-extend 3.1 and OpenFOAM 1.6-ext, using:
  • converCToMeters
  • ConvertToMeters
  • converttToMeters
Can you provide an exact example file and with which OpenFOAM version you managed to get that?

derekm January 3, 2015 16:58

Quote:

Originally Posted by wyldckat (Post 526014)
:confused: I'm unable to reproduce that error. I've tried with OpenFOAM 2.3, 2.1, foam-extend 3.1 and OpenFOAM 1.6-ext, using:
  • converCToMeters
  • ConvertToMeters
  • converttToMeters
Can you provide an exact example file and with which OpenFOAM version you managed to get that?

I'll try to recreate it.. I was just so glad to get rid of the bug I dropped the file pronto ... it was 2.3.1 on OpenSuse 12.3

derekm January 10, 2015 18:31

nope cant recreate it...
drat..


All times are GMT -4. The time now is 17:22.