CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

blockMesh - no spellcheck at convertToMeters;

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Display Modes
Old   November 21, 2014, 15:03
Default blockMesh - no spellcheck at convertToMeters;
  #1
Member
 
Join Date: May 2013
Posts: 51
Rep Power: 5
seav is on a distinguished road
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
__________________
Cheers,
seav

"OpenFOAM is like a strict teacher, won't let you through until all is correct or better say until one has understood the sensitivities of a problem." -jaswi
seav is offline   Reply With Quote

Old   November 22, 2014, 17:07
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,784
Rep Power: 22
hjasak will become famous soon enough
Do you have any ideas on how to actually implement this?
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 22, 2014, 18:11
Default
  #3
Member
 
Join Date: May 2013
Posts: 51
Rep Power: 5
seav is on a distinguished road
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.
__________________
Cheers,
seav

"OpenFOAM is like a strict teacher, won't let you through until all is correct or better say until one has understood the sensitivities of a problem." -jaswi
seav is offline   Reply With Quote

Old   November 22, 2014, 18:15
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,437
Rep Power: 25
alexeym will become famous soon enoughalexeym will become famous soon enough
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.
seav likes this.
alexeym is offline   Reply With Quote

Old   January 3, 2015, 07:24
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Greetings to all!

This feature request has now been posted at the following locations:
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   January 3, 2015, 07:49
Default
  #6
Member
 
Join Date: May 2013
Posts: 51
Rep Power: 5
seav is on a distinguished road
Hi,

Thank you for replay.

Cheers,
seav
__________________
Cheers,
seav

"OpenFOAM is like a strict teacher, won't let you through until all is correct or better say until one has understood the sensitivities of a problem." -jaswi
seav is offline   Reply With Quote

Old   January 3, 2015, 15:18
Default
  #7
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 134
Rep Power: 5
derekm is on a distinguished road
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.
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   January 3, 2015, 16:08
Default
  #8
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,748
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quote:
Originally Posted by derekm View Post
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.
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?
wyldckat is offline   Reply With Quote

Old   January 3, 2015, 17:58
Default
  #9
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 134
Rep Power: 5
derekm is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
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
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   January 10, 2015, 19:31
Default
  #10
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 134
Rep Power: 5
derekm is on a distinguished road
nope cant recreate it...
drat..
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
set of xyz data in blockMesh psk OpenFOAM Native Meshers: blockMesh 12 August 27, 2013 08:37
Blockmesh problem with more than one block sven82 OpenFOAM Pre-Processing 1 June 4, 2013 17:08
Dimensionsproblems SLT-file and blockMesh suitup OpenFOAM Bugs 3 November 19, 2009 04:00
Blockmesh cavity error message tonitoney OpenFOAM Installation 2 March 17, 2008 12:59


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