Trying to do numerical truncation in dealii

24 views
Skip to first unread message

Tom Li

unread,
Mar 13, 2023, 9:09:10 AM3/13/23
to deal.II User Group
捕获.PNG2.PNGHello everyone!
I used the matrixfree to solve a solidificatio phase field problem. I think I have no way to change the value in the local matrix and right hand side. And I'm trying to use a variable substitution. ie .the old numerical solutiuon(phi) is in the range of [-1,1]. I used psi(x) = sqrt(2.0) * atanh(phi(x)) to replace the old value phi. After this change the solution will become linear in the hole domain , psi will be very large when the point is far away from liquid/solid interface . So I want to limit psi in a range .for example[-10,10]. What should I do in dealii. thanks a lot!

Wolfgang Bangerth

unread,
Mar 13, 2023, 12:48:50 PM3/13/23
to dea...@googlegroups.com
Tom:
you don't say how you want that to happen. There are many ways in which you
can limit psi to that range:
* You can change the equations in such a way that they only produce psi values
in that range
* You can just cut off values that are larger
* You can transform values, for example you can transform
psi -> atan(psi)*10/(pi/2)

In other works, your question describes what you want to be (a state) rather
than how you want to get there (an action). Software describes actions, not
states, and you first need to think of what you want that action to be.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages