|
[Sponsors] |
Problem with Source Term in Finite Difference |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 29, 2016, 04:35 |
|
#21 |
New Member
Dan
Join Date: Sep 2016
Posts: 20
Rep Power: 10 |
Hello,
I have applied the second order backward difference now. It works, the gradient is zero now. But I'm still not sure about one thing with the backward difference at 0 °. When I would stick strictly to the formula : for the gradient dc(10)/d_theta=0=(3*c10-4*c1-1+c1-2)/2*h I would have two ghostpoints. So I thought the gradient is in the wrong direction here. I have used instead : (3*c10-4*c11+c12)/2*h=0 . Is this right or not correct ? For clarity of the location of the points : Best regards Dan |
|
September 29, 2016, 04:44 |
|
#22 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
The backward second order formula is
[3*f(i)-4*f(i-1)+f(i-2)]/(2*h) the forward is -[3*f(i)-4*f(i+1)+f(i+2)]/(2*h) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 | Seroga | OpenFOAM Community Contributions | 9 | June 12, 2015 18:18 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |