Dear Rongwei,

A few points come to mind:
- what solver are you using?
- if it is iterative, what is the tolerance you are setting for your solver?
- does the picture change if you decrease the solver tolerance?

A contrast of 1e6 in the coefficients leads to a matrix that is more ill-conditioned (precisely: a factor 1e4 worse w.r.t. contrast=1e2). A small perturbation (in the order of eps=1e-15) will result in a difference in the result that is a factor 1e4 larger w.r.t. before. 
Have you considered all these things in choosing a preconditioner, a solver, and the various tolerances?

Luca

Il giorno 13 set 2024, alle ore 07:18, Rongwei YANG <[email protected]> ha scritto:


Thanks for the kindly suggestions.
Best regards!!

Dr. Rongwei Yang (杨荣伟)
School of Civil Engineering, Tianjin University, 
135 Yaguan Rd, Jinnan District, Tianjin 300350, China P.R.


Wolfgang Bangerth <[email protected]> 于2024年9月10日周二 23:41写道:

Rongwei:

> Maybe I had not make my question clear. I dont think the question we
> encountered is not graphical output, instead, I think the the problem we
> encountered is numerical issue in Deal II.  For example, when we take thermal
> conductivity as 1e6 (the real value of the problem), there always
> exhibit erroneous results in the figure (see the figure below), in temperature
> distribution, as high as 24 degree centigrate in the figure, but as
> theoretical calculation,  all the temperatures within the figure should range
> between 0  and -50 degree.

I see. Here are two thoughts:
* Just because something is true for the solution of the exact PDE does not
mean that it is true for the discrete solution. This is most apparent for
hyperbolic conservation laws -- think, the simple advection equation
   beta.grad u=f
For these, the exact solution may have discontinuities but not over- or
undershots. But the *discrete* solution has over- and undershots unless you do
something specific about it. The same is true for other equations: Just
because you know that the exact solution should be between -50 and 0 degrees
does not mean that the discrete solution needs to satisfy the same property
(although one would hope that at least in the limit h->0 it should).

* One of the things that happens when you have large jumps in the conductivity
is that you lose coercivity of the bilinear form. A consequence is that the
matrix becomes ill-conditioned. You might want to see whether choosing a
smaller tolerance in the linear solver helps, or perhaps using a direct solver.


> On the contrary, when thermal conductivity was
> taken as 1e2, the simulation results work well. Moreover, when we make the
> simulation via Matlab, the simulation results work well even thermal
> conductivity was taken as 1e6. So we suspect that the high magnitude of
> thermal conductivity in coupled equation significantly affects the simulation
> results. But we are really not sure where is the problem and how to fix it,
> any other suggestions?

If you find that it works with Matlab, then you might want to compare the
matrix and right hand side you get from both implementations, on a very coarse
mesh. If they are different, you should find out why they are.

Best
  W.
--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 [email protected]
                            www: http://www.math.colostate.edu/~bangerth/


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/NeV2zRU_aVY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/0d27bfc5-be8a-4f16-805c-6f96589a5dd0%40colostate.edu.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAGJ%2BbAFynCr2OvLe0B5BO293WkX67XrzUXSkJnGVdtM9JFKd2A%40mail.gmail.com.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/03BD4D3C-2652-4C5F-86A2-D5B521F85B50%40gmail.com.

Reply via email to