CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Solving Laplace equation with nonlinear diffusity/conductivity

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By marupio

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2014, 06:40
Default Solving Laplace equation with nonlinear diffusity/conductivity
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I want to solve a Laplace equation, div(sigma * grad(phi)) = 0, where sigma depends nonlinearly on the solution of phi. What is the best approach for doing something like this? If I solve the equation iteratively and update sigma each time based on the current solution, what kind of conditions are required to guarantee convergence and unique solutions?
Is it possible (and beneficial) to perform this kind of iteration directly in the matrix solver?
chriss85 is offline   Reply With Quote

Old   October 20, 2014, 08:19
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
I'd use Newton-Raphson linearization. Semi-implicit. Take a phi to the power of one out of your sigma equation and put it into the matrix, and the rest goes into the source term as a derivative, I believe. Use relaxation and iterate in an inner-loop.
mm.abdollahzadeh likes this.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   October 21, 2014, 03:38
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
Thanks for your reply!

For completeness:
Newton-Raphson is an iterative procedure for finding roots of a function. In this case this means that x_(n+1)=x_n + f(x_n) / f'(x_n) with x_n = phi_n and f(phi) = laplace(sigma(phi), phi) and semi implicit in this case means to update sigma and phi_n in an alternating sequence.

What do you mean with " Take a phi to the power of one out of your sigma equation and put it into the matrix, and the rest goes into the source term as a derivative, I believe"?
chriss85 is offline   Reply With Quote

Old   October 21, 2014, 13:05
Default
  #4
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 21
marupio is on a distinguished road
I just reread my last message, and now I think I should go back and reread all the code I was working on at the time. Does not make much sense.

You want to use Newton-Raphson linearization. That uses information from one point (phi0, sigma0, and its derivative) to guess the likely sigma value at another point (phi1).

sigma*(phi1) = sigma(phi0) + derivativeOfSigmaWrtPhi(phi0) * (phi1 - phi0)

When you put this relation into the matrix equation, the diagonal and source are changed according to:

Ap -= derivativeOfSigmaWrtPhi(phi0)
Bp -= derivativeOfSigmaWrtPhi(phi0) * phi0

This is from memory... my reference material is not available to me at the moment.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   October 22, 2014, 03:27
Default
  #5
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
Why would I put this equation in a matrix and not calculate it directly?
From what I understand right now this is an extrapolation on the behaviour of sigma while phi changes.

Some more information maybe: This is for electric currents, and in this case sigma is the electrical conductivity, which is a function of the current density here, so sigma(j)=sigma(-grad(phi)).
chriss85 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
rhoSimplecFoam Mach0.8 no pressure values CFDnewbie147 OpenFOAM Running, Solving & CFD 16 November 23, 2013 05:58
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37
Orifice Plate with a fully developed flow - Problems with convergence jonmec OpenFOAM Running, Solving & CFD 3 July 28, 2011 05:24


All times are GMT -4. The time now is 01:39.