CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Problem with Source Term in Finite Difference

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2016, 03:35
Default
  #21
New Member
 
Dan
Join Date: Sep 2016
Posts: 20
Rep Power: 9
Gesetzt is on a distinguished road
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
Gesetzt is offline   Reply With Quote

Old   September 29, 2016, 03:44
Default
  #22
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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)
Gesetzt likes this.
FMDenaro 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
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 05:18
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 10:57
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44


All times are GMT -4. The time now is 07:00.