bug in tutorial no. 23

Clearly defined bug reports and their fixes
Post Reply
uwestoehr
Posts: 38
Joined: 05 Aug 2022, 14:42
Antispam: Yes

bug in tutorial no. 23

Post by uwestoehr »

I tried to make tutorial 23 "Vortex shedding". There it is written that I should input for the time step the value

Code: Select all

$ 8/200
This leads to an error when I try to run the analysis:

Code: Select all

MAIN: Reading Model: case.sif

LoadInputFile: Scanning input file: case.sif
LoadInputFile: Scanning only size info
LoadInputFile: First time visiting
LoadInputFile: Reading base load of sif file
ERROR:: SectionContents: Invalid characters for real 2 for keyword "timestep sizes": timestepping
Ti fix this, I think one must simply input

Code: Select all

$8/200
(so no space between the $ and the numbers)

At least I get then the desired results.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: bug in tutorial no. 23

Post by kevinarden »

$ 8/200

works OK on my system
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: bug in tutorial no. 23

Post by Rich_B »

Hello,

I've seen similar issues with ElmerGUI. Seems that once vector entries were added to fields like this:
Time Step Intervals = 1 2 3
Time Step Sizes = 1 2 3
Then using MATC expressions such as:
Time Step Sizes = $ 8/200
translates into two vector entries instead of one entry. As was stated in the post, removing the space after the '$' fixes the issue, and will be properly translated. This is based on testing with recent Windows installers, but I haven't tested this case in the Elmer VM.

I'll add this to my list of updates for the tutorials.

Rich.
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: bug in tutorial no. 23

Post by Rich_B »

Attached is a working example, showing issues with MATC entries in Timestep Sizes.

Based on the test, heateq_bdf2, with two entries in Timestep Sizes.

There are four variations:
Timestep Intervals(2) = 5 3 ! original, works
Timestep Intervals(2) = 5 $ 9/3 ! MATC in second vector entry, works fine even with space after the $
Timestep Intervals(2) = $10/2 3 ! fails with error message
Timestep Intervals(2) = $10/2 $9/3 ! fails with error message

Rich.
MATC_test_heateq_bdf2.zip
(1.55 KiB) Downloaded 46 times
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: bug in tutorial no. 23

Post by Rich_B »

Attached is a second archive, this one is based on the test NaturalConvection2, with a single entry in Timestep Sizes and Timestep Intervals. The six variations of the test, with one selected at a time and the other entries commented out, are:

Timestep intervals(1) = 10
Timestep intervals(1) = $20/2
Timestep intervals(1) = $ 20/2
Timestep Sizes(1) = 10.0
Timestep Sizes(1) = $20/2
Timestep Sizes(1) = $ 20/2

and each of the six variations ran without errors.

Rich.
Attachments
MATC_test_NaturalConvection2.zip
(1.97 KiB) Downloaded 44 times
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: bug in tutorial no. 23

Post by Rich_B »

Lastly, made of copy of the tutorial folder, VonKarmonGUI, loaded it in ElmerGUI and ran the project. It failed, stopping at the MATC expression. Removing the space, and running again, the project started running properly to completion.

First case, with the space, the sif has these entries:

Timestep intervals(1) = 200
Timestep Sizes(2) = $ 8.0/200

Second case, without the space, the sif has these entries:

Timestep intervals(1) = 200
Timestep Sizes(1) = $8.0/200

Notice that in the first case, the ElmerGUI sif generator created two vectors, with different sizes, which always leads to a failure.

Rich.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: bug in tutorial no. 23

Post by kevinarden »

Hah looks like, it matters
Timestep Sizes = $ 8/200
works just fine, it assumes one number, supposed to be the same as Timestep Sizes(1) = $ 8/200
but using the parenthesis changes the behavior
I would say the bug is in the parser reading the input deck, not the tutorial.
Rich_B
Posts: 421
Joined: 24 Aug 2009, 20:18

Re: bug in tutorial no. 23

Post by Rich_B »

and what about using Lua? I haven't tried using Lua to input the timesteps.

Rich.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: bug in tutorial no. 23

Post by kevinarden »

All of these work
Timestep Sizes = # 8/200
Timestep Sizes(1) = # 8/200
Timestep Sizes = #8/200
Timestep Sizes(1) = #8/200
Post Reply