Streamlines seem to be wrong

Numerical methods and mathematical models of Elmer
Post Reply
PierreAntonetti
Posts: 22
Joined: 06 Oct 2023, 14:31
Antispam: Yes

Streamlines seem to be wrong

Post by PierreAntonetti »

Hello !

I try to calculate the streamline scalar field of the flux temperature vector field on a very "basic" thermal example.
Theoretically, the iso-streamlines must flow with the thermal flux and must be orthogonal to the iso-temperatures, but I didn't get that, the streamlines seem to be erratic.

Any idea on how to fix that ?

Thanks for helping
Attachments
pic2.png
(391.16 KiB) Not downloaded yet
pic1.png
(251.61 KiB) Not downloaded yet
case.zip
(395.86 KiB) Downloaded 22 times
PierreAntonetti
Posts: 22
Joined: 06 Oct 2023, 14:31
Antispam: Yes

Re: Streamlines seem to be wrong

Post by PierreAntonetti »

I also played with different values of

Code: Select all

Stream Function Penalty=Real 0.1
, that a little bit better, but streamlines are not orthogonal everywhere. In the picture, the flux vector is displayed with a constant length (I just focus on the direction)

Theoretically the streamfunction is defined modulo a constant, how to prescribe a value at a point (as in the potential module) ?
Attachments
pic4.png
(264.3 KiB) Not downloaded yet
PierreAntonetti
Posts: 22
Joined: 06 Oct 2023, 14:31
Antispam: Yes

Re: Streamlines seem to be wrong

Post by PierreAntonetti »

No help...
kevinarden
Posts: 2353
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Streamlines seem to be wrong

Post by kevinarden »

I downloaded the problem, and looked at the sif. Made some boundary condition changes, but did not find any improvements. I suspect it may be a boundary condition issue, but have not resolved it.
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Streamlines seem to be wrong

Post by Rich_B »

While trying to run the case, I had to add some '$' to provide matc calculations, such as:
Heat Transfer Coefficient = $1/0.04
Then I got this warning:
WARNING:: VtuOutputSolver: Vtu time collection requires a transient simulation!
So I commented out the result output solver, and changed 'Post File = case.ep' to 'case.vtu'.

When I run the case, the stream solver doesn't converge:
ERROR:: IterSolve: Numerical Error: Too many iterations were needed.
Increasing the number of max iterations from 500 to 5000 to 50000 still doesn't converge. Without converging, the stream lines will be wrong.

See attached modified case.sif.

Rich.

Edit: I also set 'Linear System Abort Not Converged = True' for the stream solver.
Attachments
case.sif
(5.08 KiB) Downloaded 20 times
kevinarden
Posts: 2353
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Streamlines seem to be wrong

Post by kevinarden »

I made the same '$' to provide matc calculations because my system will not run with out it.

I did not make the other change. The solution was reported as converging.

Note that a successful numerical convergence of the solver does not mean the solution is converged. It just means the parameters you provided are satisfied.
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Streamlines seem to be wrong

Post by Rich_B »

Is this another Windows 10 issue?
MAIN:
MAIN: -------------------------------------
MAIN: Steady state iteration: 1
MAIN: -------------------------------------
MAIN:
ComputeChange: NS (ITER=1) (NRM,RELC): ( 279.22668 2.0000000 ) :: heat equation
ComputeChange: NS (ITER=2) (NRM,RELC): ( 279.22668 0.0000000 ) :: heat equation
ComputeChange: SS (ITER=1) (NRM,RELC): ( 279.22668 2.0000000 ) :: heat equation
8 0.4678E-10
9 0.1100E-10
8 0.4476E-10
ComputeChange: NS (ITER=3) (NRM,RELC): ( 3.7371026 2.0000000 ) :: flux compute
ComputeChange: SS (ITER=1) (NRM,RELC): ( 3.7371026 2.0000000 ) :: flux compute
10 0.4868E+00
20 0.5864E+00
......
500 0.2587E+08
501 0.2587E+08
ERROR:: IterSolve: Numerical Error: Too many iterations were needed.
Rich.
Last edited by Rich_B on 15 Nov 2023, 01:00, edited 1 time in total.
PierreAntonetti
Posts: 22
Joined: 06 Oct 2023, 14:31
Antispam: Yes

Re: Streamlines seem to be wrong

Post by PierreAntonetti »

Hello Rich and Kevin,

Thank you for your help, I really appreciate :
- $ is not compulsory but, in my case it works without, but better to add it ;-)
- finally, everything works fine and the linear system converge with a very few iterations. The problem came from the msh file which contains internal edges, so I modified the mesh to delete "0" tag internal edges.

So my question is : why the presence of internal edges (not matched with a defined bc in the sif) does not affect the heat/flux solvers but does affect the stream solver ?

I had a look at the source code, can someone explain to me the weak formula of the streamsolver ? The unknown is a scalar and the test functions are vectorial... How the penalty function works in the weak formulation ? How the bc are prescibed ? Not very clear for me...

Here the result with paraview
pic5.png
(229.38 KiB) Not downloaded yet
Here the updated mesh
case_msh.zip
(424.6 KiB) Downloaded 16 times
Best regards.
Post Reply