CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Some discussions about Newton's method (https://www.cfd-online.com/Forums/main/9523-some-discussions-about-newtons-method.html)

winston July 14, 2005 10:39

Some discussions about Newton's method
 
Hello,

Does anyone know how to implement the boundary conditions in Newton's method to solve NS equations? In particular:

(1) How to do function evaluation on boundaries for the continuity equation, where the pressure is not seen?

(2) How to do function evaluation on boundaries for the momentum equations where velocities and pressure all appears?

(3) What is the major difference between interior grids and boundaries on function evaluation?

I really appreciate if someone can answer this.

Thanks in advance.

Winston

ag July 14, 2005 12:41

Re: Some discussions about Newton's method
 
What I currently do is to implement the boundaries in a semi-implicit sense. Since I am solving the equations in a delta form, the boundary changes are held to zero during each iteration of the Newton loop (equivalent to an explicit update). Then the boundary conditions are applied at the end of each Newton iteration. If the BC update occurred at the end of the overall Newton loop, the update would be fully explicit. By applying the BC update at the end of each Newton iteration some "implicitness" is regained.

winston July 15, 2005 10:14

Re: Some discussions about Newton's method
 
Thanks AG. In my case, I am doing fully-implicit. My problem is that I am not sure how to do function evaluation on boundaries. For continuity equation, we have u and v, for each of the momentum equations, we have u, v, and p. When we do the function evaluation on boundaries, i.e., computing F(u,v,p) on boundaries, should we plug in those boundary conditions into each of continuity equation and momentum equations to get Fs, or there are some particular techniques? Thanks

ag July 15, 2005 10:37

Re: Some discussions about Newton's method
 
I use the previous values of p, u, and v on the boundaries for a given Newton iteration. Then I call my BC subroutine after that Newton iteration and update the boundaries with the most recent interior results. Doing this provides a "semi-implicitness" to the boundary updates, and makes handling the boundaries easy within the Newton loop. For each Newton iteration the boundaries don't change until after the iteration is performed.

So -

Begin the newton loop

compute RHS

compute LHS

modify LHS matrix assuming all dq's on

boundaries are zero during interior update.

Solve for interior dq's and update interior q's.

Call BC routine to update boundary values.

if newton not converged repeat.

End Newton loop

I've never implemented a scheme where it's fully implicit because I've never seen a case where it was worth the effort.

winston July 15, 2005 13:35

Re: Some discussions about Newton's method
 
Thanks. In your case, your boundary subroutine has been written, in my case, however, I try to write a boundary subroutine and implement boundary conditions there. So, I need the detailed boundary calculation.

By the way, I compute numerical Jacobian, so I need to do function evaluation F(u,v,p) on the boundary.

My real question is how to compute F(continuity), F(u-momentum), and F(v-momentum) on boundaries given the boundary conditions of u, v, and p.

If you could check your boundary subroutine and give me some hint, that would be great.

Thanks

Winston

ag July 15, 2005 14:21

Re: Some discussions about Newton's method
 
The boundary conditions I use are based on physical approximations/conditions at the boundary. For example, on a non-moving solid surface the normal pressure gradient is zero and the velocity is either tangential to the surface (inviscid flow) or zero (viscous flow). So I never explicitly write out the equations of motion on the boundary. But it sounds like you want to write the equations for the fluid motion for the boundary points. Just use ghost points (which get values assigned by extrapolation at each time step) and then simply apply the discrete equations to the boundary. You'll still need to invoke any additional physical constraints, such as the no-slip condition, within those equations. For example, the no-slip condition implies that velocity derivatives along the surface are all zero, so those terms should be zeroed out in the discrete equations for points on a no-slip wall.

Winston July 16, 2005 22:19

Re: Some discussions about Newton's method
 
Thanks AG. You are absolutely right. I use numerical Jacobian, and I do function evaluation on every grid points, that is why I need to evaluate the continuity and momentum equations on the boundary. But to my dispointment, I cannot get it work.

If you also use Newton's method, how do you compute your Jacobian matrix? Numerically or Analytically? Thanks.

Winston

ag July 17, 2005 23:05

Re: Some discussions about Newton's method
 
Analytically. I don't have any real experience using numerical Jacobians.


All times are GMT -4. The time now is 06:25.