failure in calculating the solution

Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

failure in calculating the solution

Timmy098
This post was updated on .
Good morning. i would like to report an issue i'm having with a non-newtonian flow and diffusion and convection system:
Specifically, when using either the variable Dof or the variable Dg it fails to provide a solution showing the following:

this happens also when i explicitly wrote the numerical value of the more complex constants. i have also tested all the variables to check for mistakes in writing them down, but they showed no such error. meaning that it should theoretically work.
the linear solver backslash in particular gives me the following errors:

Also, for reasons unknown to me, when i use other fixed diffusivities, regardless of the mesh used, it provides me negative values with the distribution shown in the following image:

and the solver backslash gives me the following errors:

As such, i would like to ask if i'm making any mistake in either defining the variables, a typo that escaped my check and tests or if it's any other issue i failed to notice and if those two issues may be related in some way.
thank you in advance
issue_non_calc_ready_to_present.fea
Reply | Threaded
Open this post in threaded view
|

Re: failure in calculating the solution

Precise Simulation
Administrator
(Moving here for now as it is not clear it is an issue with the software, but seems more like a modeling and convergence issue.)

It is really hard to say anything with close to 60 parameters and variables. What you would need to do is significantly simplify and reduce the model (including geometry, mesh, parameters, number of physics modes etc.) to a "minimum reproducible example" where it is clear that a specific change or parameter causes an issue (for example when you change parameter "a" from "x" to "y").
Reply | Threaded
Open this post in threaded view
|

Re: failure in calculating the solution

Timmy098
good morning.
Thank you for the answer.
issue_non_calc_a_bit_more_presentable.fea

Here's the model with a minimized number of constants.
the error of non-solvability is given with the diffusivity already in the equation while the negative value in the plot shown in the previous post appear with the variable D_mol_liter.
i apologise in advance for not managing to further reduce the number of parameters.
thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: failure in calculating the solution

Timmy098
In reply to this post by Precise Simulation
Good morning.
I tried to simplify the system as much as possible.
issue_non_calc_as_presentable_as_possible.fea
of the 2 diffusivities present in the constants, the D_mol_liter is the one that gives me the concentration plot with the negative value shown in the first post and that the backslash solver is unable to solve. the other, Dof, is the one that does not give me a solution no matter what, resulting in the following error messages:

an analogous error message is given with any diffusivity (including arbitrary finite numbers) when multiplied by the factor "(1e-3/miu_nn)".
In case of the Dof parameter, i confirmed that the issue lays in the dG parameter as removing it from the equation makes everything work, as proved in the following model
proof_issue_is_dG.fea as removing dG from the parameters makes it technically work.

As such, i would like to ask which may be the issue in the "dG" parameter.
thank you in advance.
Reply | Threaded
Open this post in threaded view
|

Re: failure in calculating the solution

Precise Simulation
Administrator
I have had a look at your model and can confirm that one problem seem to be in the "Dg" expression which is not valid for "c = 0" (which is the given initial condition).

For example try plotting "Dg" at "t = 0" (and clicking somewhere in the plot to directly evaluate it at specific points and print the expression in the command/log window). If there is no color in the plot this means the values are invalid. Exporting the "fea" struct and manually evaluating (with evalexpr) results in "nan" values (not a number) for "c = 0".

Such issues are typically due to division by or logarithm of zero. It might be helpful to try to use a symbolic tool to simplify the expressions further, as it is still very difficult to see what it is doing. For example in your expression:

Dg: 1-1.1514*(0.5091*1/3*(2*1+1*2^2))*sqrt(c*1000)/(1+(a*k*10^-8/sqrt(c*1000))*sqrt(c*1000))^2+2.303*10^(14*log10(a)-9.75)*c*1000

the factor "1.1514*(0.5091*1/3*(2*1+1*2^2))" can be simplified to just "1.1724", and so on.

After you find this issue, you might also want to have a look at the new section on solution strategy for highly-nonlinear problems https://featool.com/doc/solver#solver_nonlinear.