CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Nonlinear derivative in finite difference (https://www.cfd-online.com/Forums/main/234097-nonlinear-derivative-finite-difference.html)

BoxQwerty February 23, 2021 08:24

Nonlinear derivative in finite difference
 
1 Attachment(s)
How to write this in finite difference?

Attachment 82923

acf46545 February 23, 2021 09:24

first decide which finite difference you need for d/dx. stencil size - number of nodes - one sided or central. then plug in for inner derivative and apply. then plug in for outer derivative and apply. alternative is: work out full terms first, then apply. what is the purpose of this?

FMDenaro February 23, 2021 12:49

Quote:

Originally Posted by BoxQwerty (Post 797041)
How to write this in finite difference?

Attachment 82923




If you want to use the divergence form you simply write


0.5*(f(i+1)**3-f(i-1)**3)/h


where f is a vector where you previously computed the discrete derivative du/dx.


Conversely you can expand the derivative in a quasi-linear form.


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