nextfoam / baram

CFD for Everyone
https://baramcfd.org/
GNU General Public License v3.0
100 stars 17 forks source link

BaramMesh: Cannot get past step 4 #51

Closed raffiniert closed 5 months ago

raffiniert commented 10 months ago

Describe the bug I cannot get past step 4 neither after importing an STL nor after adding a simple geometry. "Next" is grayed out no matter what I try.

To Reproduce Steps to reproduce the behavior:

Expected behavior I can click the "next" button ;-)

Screenshots

image

Desktop (please complete the following information):

jiban commented 10 months ago

Hi Raphael. Thank you for getting in touch with me. It looks like the refinement process failed in that the Refine button was not changed to "Reset". Yet I have no more clue for now from your screenshot. Could you give me the case you are working?

raffiniert commented 10 months ago

Hey Jake

thank you so much for the fast response! I just tried again by not even importing an stl, but simply adding a cube, proceeding to step 4, clicking "refine" shows a progress bar and the button switches to "cancel" for a fraction of a second and then it's as it was before. Still cannot click "next".

Thanks again Raphi

jiban commented 10 months ago

Yes, I know. It seems to be quite a simple case and should work without any problem. That's the reason why I asked you to give me the case. To investigate the cause of the problem, I need the case exactly as is. You can attach the case on this thread or send it to my email ( jkyun@nextfoam.co.kr )

raffiniert commented 10 months ago

Archiv.zip

I hope this is what you need :-) Thank you for investigating!

jiban commented 10 months ago

Yes, that's what I need. But the archive doesn't seem to have all files. Following is the contents of the archive you sent to me.




Yet usual contents of BaramMesh case looks like following.


Important file here is configurations.h5 that actually contains configurations. (Ignore _MACOSX and case.lock for they are trivial. )

Could you please check the file structure in you mac?

raffiniert commented 10 months ago

It's actually everything that's in the folder:

image

Another test-case looks the same:

image
jiban commented 10 months ago

It seems that hdf5 itself is not working on your mac. I will look into this issue further, yet I'm afraid it would take some time to start because it's holiday season. By the way, did you install open-mpi on your mac? It's mentioned on BaramCFD page. image

raffiniert commented 10 months ago

It was not installed, thanks for the heads up. However, it did not change anything on the problem...

jiban commented 10 months ago

Ok, Then could you try running a command in a terminal? You can run BaramMesh from a terminal. Your BaramMesh application may reside in /Applications/baramMesh.app/Contents/MacOS/baramFlow. Would you execute the command from a terminal and let me know the output from the terminal? A clue must be there.

raffiniert commented 10 months ago

Funny... if I open it from terminal like this:

/Applications/BaramMesh.app/Contents/MacOS/BaramMesh

it works.

There is no "baramFlow" in that folder btw

However, while I can now "refine", it ends with an error:

while reading normal on line 2 expected <float> <float> <float> but found '0,56163184332377003 0,82738725670918112 0'

Case attached. Archiv.zip

jiban commented 10 months ago

Hi, @raffiniert, Thank you for the valuable information. If the app runs from a terminal without any issue, the problem might be caused by a path related to homebrew. I will look into this further next week. By the way BaramFlow might be in /Applications/BaramFlow.app/Contents/MacOS/BaramFlow. And for the error you encountered, the message shows that ","(comma) is used for decimal separator. This might be caused by locale that BARAM respects while OpenFOAM does not. Could you try changing the Number format and create a new project case? ( already-made project may have wrong information in it ) You can refer this link Thank you.

raffiniert commented 10 months ago

Hi @jiban I have to thank you for your patience! :-)

I changed the number format in OSX, created a new project, and got the same error as above again.

jiban commented 10 months ago

Hi @raffiniert, Fortunately, one of my colleagues could reproduce one of your issues, not running from Finder. We are looking into the root cause of it and will let you know as soon as we find something. Thank you for your patience too. :-)

jiban commented 10 months ago

Hi, @raffiniert. Now, I finally figure out the locale mechanism on macOS. If you execute baramMesh from Finder, it must work. Following error happens only when you run it from a terminal where locale is configured to use ","(comman) as decimal separator. while reading normal on line 2 expected <float> <float> <float> but found '0,56163184332377003 0,82738725670918112 0'

In your case, the first error you encountered happened because OpenMPI was not installed, and the second error did because it was executed from the terminal.

By the way, which locale do you use for your terminal? You can check it with a command, locale.

Here are some sample outputs.

Germany

LANG="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_CTYPE="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"

ANSI C

LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
raffiniert commented 10 months ago

Hi @jiban :-)

Thanks for your help & patience!

My locale is

LANG="de_CH.UTF-8" LC_COLLATE="de_CH.UTF-8" LC_CTYPE="de_CH.UTF-8" LC_MESSAGES="de_CH.UTF-8" LC_MONETARY="de_CH.UTF-8" LC_NUMERIC="de_CH.UTF-8" LC_TIME="de_CH.UTF-8" LC_ALL=

So, do I need to install OpenMPI manually and then launch the program like usual or from terminal?

jiban commented 10 months ago

I think you can just install OpenMPI via homebrew and launch the program by just double-clicking the icon as usual.

Have a nice day!

jiban commented 10 months ago

Hi, @raffiniert. Can you now run Baram by double clicking the icon? Do you have any other issue?

raffiniert commented 10 months ago

Hey @jiban thanks for asking! I still have the exact same issues - I can't get over the "4. Castellation -> refine" step. No error message in console...

jiban commented 10 months ago

Oh, I'm sorry to hear that. Ok, Now let's try one final procedure.

First, open a terminal window.

Then type following commands.

export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

And run BaramMesh from that terminal by typing following command as you know.

/Applications/BaramMesh.app/Contents/MacOS/BaramMesh

This will run BaramMesh in en_US.UTF-8 environment, and it should work if my hypothesis is correct.

I will be waiting for your success. Thank you.

raffiniert commented 10 months ago

Hey @jiban !

That works!! Thank you so much. However, the produced export cannot be imported to OpenFoam ;-) I attach it below

Thanks! barammesh_asd7.zip

jiban commented 10 months ago

Ok! Then your issue was definitely caused by locale though I'm not sure why I do not have same issue on my macOS. I hope some other macOS users may give us more information in the future.

By the way, your current error has to do with names. I could see following error message when I tried opening your exported case with BaramFlow.

image

image

OpenFOAM(of course BaramFlow too) can handle only alphanumeric characters and "_"(underscore). You can refer to this link.

A name can start with an alphabet character or an underscore.
A name cannot have spaces in it.
A name cannot start with a digit (0 to 9), but it can have digits in any other place of its name.
A name cannot have quote symbols, namely: " '
A name can be a composite of several names, by using dots and parenthesis, namely: . ( )
A name cannot have unconventional symbols, including there characters: \ / : ; , |

To be safe, I would recommend using only a-z, A-Z, 0-9, "_" characters for everything including names and file paths.

This is a capture of the case you made after I changed boundary name. image

jiban commented 5 months ago

Closed because no response for a long time