[CFD] Green-Gauss Cell-Based and Node-Based Gradient Schemes

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

ความคิดเห็น • 82

  • @2_Pi
    @2_Pi 5 ปีที่แล้ว +13

    Just making sure I understand it correctly, correct me if I'm wrong: the term on the RHS with C • n cancels to 0 because of the integration over an enclosed surface, not because C • n = 0 for each face.

    • @fluidmechanics101
      @fluidmechanics101  5 ปีที่แล้ว +3

      Yes thats the one!

    • @mengyuwang5159
      @mengyuwang5159 4 ปีที่แล้ว

      @@fluidmechanics101 But the integral of T(C n) is not supposed to be 0, considering T is constant and smaller on one side and larger on the other side.

    • @vladimirleonov9002
      @vladimirleonov9002 3 ปีที่แล้ว

      @@fluidmechanics101 Why integral should be zero, if T is not constant?

    • @stanleywong9004
      @stanleywong9004 3 ปีที่แล้ว

      Any reference material on this? I find it hard to understand why its 0.

    • @abstractnonsense9588
      @abstractnonsense9588 3 ปีที่แล้ว

      since C is constant in space, grad dot C on the LHS is zero, which means that it is not appearing on the RHS..

  • @milansekularac6196
    @milansekularac6196 ปีที่แล้ว +3

    25:20 the skewness error you mention can be acounted for (I believed it is by major cfd codes, but please check). Say the point on the face where PN line intersects the face is f', whereas the face center is f. The correction term is thus a dot product: (gradT)_f' • (r_f - r_f'). To calculate the gradient (gradT)_f' at f' you just use weighted linear interpolation of the gradT values at cell centroids P and N. I believe they advocate for this correction term to be calculated explicitly, in flow simulations, since we are running an iterative solution procedure anyway. Check papers by S. Muzaferija, M. Perić, Ž. Lilek, I. Demirdžić, for this. Well done for your videos.

  • @bojanniceno9004
    @bojanniceno9004 3 ปีที่แล้ว +3

    This guy is great. I know all these concepts since ages, but the way he explains and presents is amazing.

  • @shemafonso3206
    @shemafonso3206 ปีที่แล้ว +1

    I always used ansys cfd but never understood the working behind these softwares or how the equations are used. Ty for a clear and concise explanation. It will help me learning openFoam

  • @karendanyele3962
    @karendanyele3962 4 ปีที่แล้ว

    I'm working with ANSYS Fluent and needing to learn, basically, how it works with my partners and alone, just with searchs. One of my University masterminds gave me a recomendation of one of your videos. Now, I'm watching some of them and i can say that they're really useful and your speech is very good to understand,since I am Brazilian and do not constantly practice my English. Thanks for this work and congratulations!

  • @himanshubanait9166
    @himanshubanait9166 2 ปีที่แล้ว

    Please make a video on Flux-Vector splitting schemes.

  • @hardiksharda9673
    @hardiksharda9673 2 ปีที่แล้ว +1

    As usual amazing talk
    Thank you for your efforts Dr. Aiden

  • @rafaortwein6646
    @rafaortwein6646 2 หลายเดือนก่อน +1

    Great explanation. Thank you.

  • @carlosmraposo96
    @carlosmraposo96 4 ปีที่แล้ว +2

    Great videos Prof. Adrian! I've been studying CFD for a while now, and currently I don't know how to handle face gradients in boundaries.
    Let's say the face center boundary is b; cell center is C and let's say we want to evaluate ϕ Diffusive flux would be:T is the orthogonal correction. S is the surface vector.
    ∇ϕb ⋅ Sb = ∇ϕb ⋅ Eb + ∇ϕb ⋅ Tb = (ϕb - ϕC) x |Ef|/|Cb| + average(∇ϕb) ⋅ Tb
    How to compute average of ∇ϕb ? And let's say we have dirichilet boundary condition ϕb is imposed

    • @fluidmechanics101
      @fluidmechanics101  4 ปีที่แล้ว +2

      Hi Carlos, this bit is quite tricky and it is difficult for me to explain in a message. My best advice would be to read Hrvoje Jasaks thesis (a quick google search should find it) as he does a good job of explaining with pictures.
      The problem is even more complicated than it appears because the boundary value varies linearly along the face ....

    • @carlosmraposo96
      @carlosmraposo96 4 ปีที่แล้ว

      @@fluidmechanics101 thank you! I will follow your advice!

  • @steamedbean7830
    @steamedbean7830 2 ปีที่แล้ว

    As always, your video is easy to understand yet very informative. Thank you so much.

  • @dimitrisvitlaris6386
    @dimitrisvitlaris6386 5 ปีที่แล้ว +3

    Thank you very much, this is the best explanation I have found! Great video! However, I think the most demanding field in CFD is the modelling of compressible flows, where discontinuities are present. Will you make a video about this topic? I know that there are many many things to cover so I recommend to make a series of videos, if you want of course.
    I really enjoyed all your videos

    • @fluidmechanics101
      @fluidmechanics101  5 ปีที่แล้ว +3

      Yes, i haven’t really covered any compressible flow yet! I will do in future 😊 it is quite a tricky topic, so i will probably cover it in a few videos

  • @armaanmohammed8874
    @armaanmohammed8874 11 หลายเดือนก่อน +1

    Hi. You mentioned in some comment replies that the temperature at the face is obtained in the previous iteration. Do you mean that the values of the temperature at the centroid of the cells (for cell-based method) are taken from the previous iteration? Could you also explain where the "iterations" come from. Is that when we run the SIMPLE algorithm? Thanks

    • @fluidmechanics101
      @fluidmechanics101  11 หลายเดือนก่อน

      Yes, you are correct for both. Temperature at the cell centroids to calculate the cell-based gradient is taken from the previous 'loop' of the SIMPLE algorithm 👍

  • @shubhamsangodkar6992
    @shubhamsangodkar6992 4 ปีที่แล้ว +2

    Hello again Adrian,
    This video was super useful and brilliantly narrated about. Finally I could make some connections with openFOAM , with which i had been struggling with. I had a follow question (which might sound stupid)
    1) We started with the objective to find the gradient becoz we want to determine the face values, but at the end, we found the gradient in terms of the face values itself. I don't know what i'm missing , but i can see 2 unknowns , the gradient and the face value.
    Is there a particular order in which they are calculated , for ex , lets say,
    After we initialize the field, we have cell centre values , use these values to find the face values via one of the G-G method and then use these face values to find the gradients for the 1st iteration, Next iteration onwards , the face values are determined by the gradient calculated and using say linearUpwind Method?
    2) Are you allowed to calculate values of say (T) at places other than face centre? or is it that when there is skewness present in cells , the value calculated is actually at d_PN (25:21) but it is assigned to the face centre , which I guess is wrong because the distances involved in linear interpolation are wrong.
    Let me know, Thank you

  • @michaelmousley6604
    @michaelmousley6604 11 หลายเดือนก่อน

    Thanks for the great content and the excellent, clear, concise explanations :) One small comment, it seems to me that in deriving the final form of equation 12 you have used a slightly different logic to the ‘clever trick’ used for the surface integral. If the temperature varies linearly across the cell then gradT will be a constant across all of the cell, so it can be taken outside the volume integral.

  • @asifraj321
    @asifraj321 2 ปีที่แล้ว

    Very nicely explained. Hats off sir

  • @armaanmohammed6922
    @armaanmohammed6922 11 หลายเดือนก่อน

    Hi, thank you for the video. I just got a small question. At 13:44, I don’t understand why the RHS term is set to 0. The surface integral would reduce to a summation, where we dot the dot product of C and the normal unit vector at every face, and multiply with the temperature at that face. Since these temperatures are different, the summation shouldn’t equate to 0, in general. Where am I wrong here?

  • @idiosinkrazijske.rutine
    @idiosinkrazijske.rutine 5 ปีที่แล้ว +1

    Nice explanation. Maybe the follow up on calculation of node values in nodal method may be useful (weights for 3D case are not given in the original literature, some hand calculations may be needed). One more interesting point that would be clear then is that nodal method uses wider „computational molecule" and consequently gradient at cell centroid will be based on values obtained from more surrounding cells. I would therefore recommend nodal method for meshes based on tetrahedra, as they don't have enough immediate neighbors to estimate the cell centered gradients as eg. polyhedral meshes (and often have skewness). Computational overhead is not much greater because weights for interolation to nodes are calculated beforehand and stored.

    • @fluidmechanics101
      @fluidmechanics101  5 ปีที่แล้ว +1

      Yes! I am still trying to find a good paper for the node based scheme. Once i do, a follow up video will be coming 😄 i feel like we need a complete set of videos for each of the schemes, so that they can be a good reference for everyone

  • @milothatch9221
    @milothatch9221 4 ปีที่แล้ว +4

    Hi Aidan!
    First of all, thank you for your videos. I am a big fan, you're the best CFD teacher ever!
    I have one question for you, let see if I can explain it properly:
    Let's suppose that I am using a Green-Gauss Cell Based Gradient scheme in my simulation and a Linear Upwind Differencing scheme for the variables. The first one calculates the gradient of the fluid variables, which is going to be used by the second one. However, the Cell Based Gradient scheme needs the value of the fluid variable of the faces, which is actually the objective of the Linear Upwind Differencing scheme calculation.
    Am I in a loop? Don't we need what we are going to calculate to actually start the calculation? I think I'm missing something.
    Thank you again. You are producing a really high quality content.

    • @omkar260
      @omkar260 ปีที่แล้ว

      Same Question

    • @fluidmechanics101
      @fluidmechanics101  ปีที่แล้ว +1

      Good question. The gradient calculation (green Gauss etc) is calculated explicitly using the values from the previous iteration, to calculate source terms.
      Upwind differencing is implicit and is used to calculate the coefficients for the matrices themselves.
      This is definitely confusing and isn't really explained anywhere, so I might do a video on this sometime

  • @maxwellgomes9372
    @maxwellgomes9372 3 ปีที่แล้ว +1

    Excelent content and amazing explanation!

  • @SS-ur8jb
    @SS-ur8jb 2 ปีที่แล้ว +1

    Useful and interesting

  • @CesarLopez-qt9mo
    @CesarLopez-qt9mo 5 ปีที่แล้ว +2

    What an amazing explanation Prof. Adian, thank you very much. I would like to ask you if there is a possibility you can talk about conjugated heat transfer. Best regards Sir.

    • @fluidmechanics101
      @fluidmechanics101  5 ปีที่แล้ว +3

      I think i spoke about CHT briefly in my energy equation video. You can solve the same energy equation in the solid and fluid zones by setting the velocity to zero in the solid zones 😄

  • @sourabhmore9466
    @sourabhmore9466 4 ปีที่แล้ว +2

    A very nice explanation!
    I have one question at 20:32, for calculating the gradient we need a face centre value which is the first step. But how the face centre values are known before calculating gradient?

    • @fluidmechanics101
      @fluidmechanics101  4 ปีที่แล้ว +3

      Good question! The face centre values which are used for calculating the gradient are lagged from the previous iteration 👍

  • @th3sci3nt1st
    @th3sci3nt1st 2 ปีที่แล้ว +1

    Thank you very much for your video! Your content is really nice and helpful. I got a question though. I saw in your summary that "The Green-Gauss Cell-Based method for computing Tf has a skewness error on orthogonal meshes'', shouldn't it be 'non-orthogonal' instead?

    • @fluidmechanics101
      @fluidmechanics101  2 ปีที่แล้ว +1

      Ah yes, I think I misspoke 😅 sometimes it happens when I do a whole lecture in one take with no cuts!

    • @th3sci3nt1st
      @th3sci3nt1st 2 ปีที่แล้ว

      ​@@fluidmechanics101 Thank you very much for taking the time to reply! I don't remember if you actually misspoke it, but I saw that written in your 'Summary' slide though. I asked because I wasn't sure if I understood well 😅. I enjoy alot your videos. Your content is well organized and professional. Thank you again for sharing your knowledge.

  • @MrPlankton996
    @MrPlankton996 2 ปีที่แล้ว +1

    I am not sure if I understood it correctly, so I am going to simplify it. Gradient schemes are used to calculate cell based values out of face values and that's how they calculate gradients. Gradients are useful for upwind schemes which use them to calculate face values out of cell based values calculated by gradient schemes? :D

    • @fluidmechanics101
      @fluidmechanics101  2 ปีที่แล้ว

      Yes. You are correct. The trick is to use the face values from the previous iteration to calculate the cell centre gradients. In this way, the cell centre gradients are lagged to the values from the previous iteration of the algorithm (which gets around this loop you have spotted)

    • @MrPlankton996
      @MrPlankton996 2 ปีที่แล้ว +1

      @@fluidmechanics101 Thank You very much. I am glad that I got it. Also, big thanks for answering the comments :)

  • @rahulwadibhasme2119
    @rahulwadibhasme2119 5 ปีที่แล้ว +2

    Excellent video thanks for it.

  • @jacks.554
    @jacks.554 10 หลายเดือนก่อน

    Hello Aidan, as always great work! Could you please guide me on some references to the decomposition of the RHS of eq. (7) into the RHS of eq. (8)? I am inclined to believe that the term on the RHS of eq. (7) is equivalent to either term in eq. (8). So, it would make sense to me to put a factor of 0.5 before each of the two terms on the RHS of eq. (8). Could you elaborate more on this issue? Thank you!

    • @chat_duveteux
      @chat_duveteux 5 หลายเดือนก่อน

      I'm not sure but it seems that there are 2 mistakes. Like that redundant term in the RHS appears from nowhere and then it is set to zero, despite T is not a constant. So the answer is correct)

  • @hk318i
    @hk318i 5 ปีที่แล้ว +3

    Regarding grad(U), this should be a tensor not a vector, isn't? Unless you mean by U_f the face normal component of the velocity vector.

    • @fluidmechanics101
      @fluidmechanics101  5 ปีที่แล้ว +1

      Yes, you are right. I must have mispoken! Sorry about the slip 😅

    • @hk318i
      @hk318i 5 ปีที่แล้ว +1

      @@fluidmechanics101 no worries, great videos, keep it going! 👍

  • @colletantoine8885
    @colletantoine8885 2 ปีที่แล้ว

    Thanks for this great video. Any references/suggestions to compute the second order spatial derivatives that matches this first order scheme ?
    I precise that I need that for reularization purposes. e.g., to compute a smoothing regularization, I can calculate a Tikhonov objective function which is defined as jreg = 0.5 \sum grad(T) ** 2. This video present how to get grad(T) -> this is the difficult part. However, I have no clue how to compute the gradient of jreg with respect to T, which should be something like greg = -hessian(T).

  • @aurelianobuendia6937
    @aurelianobuendia6937 3 ปีที่แล้ว

    Ok, the thing I don't get is this:
    We need the face center values (φf) in order to compute the gradient (nablaφ)p, but then again we need the gradient to compute the face center values themselves, in linear upwind diff scheme for example φf=φp+(nablaφ)p*r. What am I missing here ?
    And cheers for that great work of yours ofc ;)

    • @fluidmechanics101
      @fluidmechanics101  3 ปีที่แล้ว +1

      In the linear upwind differencing scheme the gradient part (nabla phi) is lagged (it is computed explicitly using the values from the previous iteration. The upwind bit is implicit. All of the gradient videos I have are explicit calculations using the solution values at the centroids from the previous iteration

    • @aurelianobuendia6937
      @aurelianobuendia6937 3 ปีที่แล้ว +1

      @@fluidmechanics101 alrighty! thanks for the clarification man

  • @colletantoine8885
    @colletantoine8885 2 ปีที่แล้ว +1

    How do you handle the case of boundary cells ? Let's take a 1D example: [10, 10, 15, 20, 25] (mesh is 1x1x1m). If I apply the presented method, then the gradient should be [10, 2.5, 5, 5, -2.5] which is obvisouly not correct ? For me it should be [0, 2.5, 5, 5, 5] I am a bit lost...

    • @fluidmechanics101
      @fluidmechanics101  2 ปีที่แล้ว

      As in the boundary cell?

    • @colletantoine8885
      @colletantoine8885 2 ปีที่แล้ว

      @@fluidmechanics101 Yes absolutely. I can apply this method very easily by iterating the neighbours of the cell, but I also need to consider the "free" faces of the cell. In that case I suppose I need to take the value at the center of the cell for the face value ?

    • @fluidmechanics101
      @fluidmechanics101  2 ปีที่แล้ว

      Yep. Also remember that the distance to this face centre is different to the distance between cell centroids. I find that a good way to check is to use a grid of uniform squares, then rectangles with a simple linear pressure field, to make sure you are getting the gradient right

  • @DaleCKramer
    @DaleCKramer 5 ปีที่แล้ว +1

    I love your videos. Can comment on a this advice which was given to me by a very experienced OpenFoam user in 2018... 'Please don’t use the leastSquares gradient scheme in OpenFOAM. There is a coding mistake in it causing it to be 1st order accurate at boundary.' Was there a coding error, if so, has it been fixed and in what version?

    • @fluidmechanics101
      @fluidmechanics101  5 ปีที่แล้ว

      Yikes! I am not very up to date with the openfoam leastSquares algorithm. As as an experienced foam user he/she is probably right. I suppose the best you can do is make sure to always use the latest version 😊

    • @DaleCKramer
      @DaleCKramer 5 ปีที่แล้ว

      @@fluidmechanics101 Darn, not possible to use latest version if using SimScale....

    • @shubhamsangodkar6992
      @shubhamsangodkar6992 4 ปีที่แล้ว

      Well, there is a big debate about this . Follow this link. @Fluid Mechanics 101 Might be an interesting read for you too.
      www.cfd-online.com/Forums/openfoam-solving/189825-gauss-linear-gradient-makes-openfoam-zeroth-order-accurate-unstructured-meshes.html
      Let me know your thoughts about this.
      Also, from my experience , if least square was really first order, it would not blow up that easily on dirty meshes , you will see that , it is very difficult to use least squares method for dirty meshes.

  • @nikhilnick8886
    @nikhilnick8886 5 ปีที่แล้ว +2

    danke schön

  • @joseoswaldoc.2068
    @joseoswaldoc.2068 ปีที่แล้ว

    Hi. In what kind of books can I find these types of problems for me to solve?

  • @orlandopalone80
    @orlandopalone80 3 ปีที่แล้ว

    Thank you for this precious video.
    I am finding difficulties understanding the skewness error. Is the problem related to the fact that the point in which is located the face value is not exactly corresponding to the face center or is it just related to inaccuracy in the computed value?

    • @fluidmechanics101
      @fluidmechanics101  3 ปีที่แล้ว +1

      Ahhh it's both. We calculate a value by interpolation (a scalar). We then assume that this is the value at the face centre. As the line does not actually intersect the face centre, we have actually calculated the value at the intersection, so our face centre value is inaccurate. I am still looking for a paper on this. Will let you know when I find one!

    • @orlandopalone80
      @orlandopalone80 3 ปีที่แล้ว +1

      ​@@fluidmechanics101 too kind. Thank you for your precious contributions.

  • @arminsh9315
    @arminsh9315 3 ปีที่แล้ว

    Thanks an ocean for your great informative videos. There's something which I find confusing when I use Ansys Fluent. On the one hand, the gradient schemes are selected under gradients from Spatial Discretisation. On the other hand, the pressure schemes (e.g PRESTO!, second order etc) are set right after the selection of the gradient schemes. As the tutorial suggests, the pressure scheme utilizes the selected method to calculate pressure value on the face and this is exactly what we expect from the gradient scheme! Does it mean our selected option under gradient schemes is not valid for pressure? I was wondering if you could kindly help me resolve the ambiguity I have been encountered with. Thank you very much indeed.

    • @fluidmechanics101
      @fluidmechanics101  3 ปีที่แล้ว +1

      Yes, I probably should have explained this. The gradient schemes are for everything except for pressure. As fluent is a cell centred code you need to use a different gradient calculation for pressure or you get 'checkerboard oscillations'. It is also advantageous to use body force weighted or presto for flows with high buoyancy forcing, so fluent let's you choose the gradient scheme for pressure separately. This is different to OpemFOAM where you have to choose the gradient scheme for all variables separately ...

    • @arminsh9315
      @arminsh9315 3 ปีที่แล้ว

      @@fluidmechanics101 Thank you very much indeed. Can you please introduce some sources from which I gain basic acquaintance with "checkerboard oscillations" and also figure hoe cell centered codes may lead to such oscillations?

    • @fluidmechanics101
      @fluidmechanics101  3 ปีที่แล้ว

      Have a look for 'Rhie Chow interpolation' on Google and you should find what you are looking for

  • @sourabhsingh9292
    @sourabhsingh9292 3 ปีที่แล้ว +1

    thank you brother

  • @muhammadchoudhry5864
    @muhammadchoudhry5864 3 ปีที่แล้ว

    Is there any tutorial case in OpenFOAM which used a node-based gradient scheme

    • @fluidmechanics101
      @fluidmechanics101  3 ปีที่แล้ว +1

      Not sure, most of them seem to be least squares or cell based. I would have a quick search on the OpenFOAM website

  • @himanshushrivastava7062
    @himanshushrivastava7062 4 ปีที่แล้ว +1

    Hii... A stupid question but I am really confuse.. where exactly the term gradient of T or U over a cell will be used.
    After applying Gauss theorem to NS equation, we need surface integral of face flux and velocity over all surface for convective term and for diffusive term, we need surface integral of gradient of velocity over all surface. Like u show for 1d temperature profile in intial part of video.
    Then where will gradient of velocity over cell will be used ?

    • @himanshushrivastava7062
      @himanshushrivastava7062 4 ปีที่แล้ว +1

      To add to my point, I read book by versteeg and there they didn't solve any gradient of temperature over a cell ... infact the solved the gradient of temperature over a surface

    • @fluidmechanics101
      @fluidmechanics101  4 ปีที่แล้ว +1

      Good question. The gradient over the cell is used in: 1) linear upwind differencing, 2) non orthogonal correctors and 3) some source terms. Have a quick watch of my non-orthogonal correctors video to see an example. I realise that this can be quite confusing but you have the right idea: the face flux surface integrals are different to the gradient at the centroid of the cell. They are used for different things 👍

    • @fluidmechanics101
      @fluidmechanics101  4 ปีที่แล้ว +1

      And just to add: you only see non orthogonal correctors when the cells arent perfect rectangles. All the cells in versteeg and perfect squares or rectangles, so they dont need a non orthogonal corrector and you dont see the gradient calculation at the cell centroid. I hope this helps 😊

    • @himanshushrivastava7062
      @himanshushrivastava7062 4 ปีที่แล้ว

      @@fluidmechanics101 hello.. Thank you for the quick reply.. but I watched the non orthogonality video (both part 1 and part 2) . I couldn't find anything regarding gradient of velocity or temperature over a cell .. I only saw gradient of velocity or temperature over a surface..
      I am sorry to bother.. thank you for your help and love your videos

  • @mohammadmohagheghfaghih8313
    @mohammadmohagheghfaghih8313 5 ปีที่แล้ว +1

    Great video!
    Sometimes, the screen showing your face blocks the contents in the slide. You can either remove it, or at least move it around on the slides where it may block the content.
    Thanks

  • @arionfar
    @arionfar 2 ปีที่แล้ว

    If it's linear every where, pass a line and then the slope is gradient. in the exaple: (200-150)/1=50

  • @AeroDZ
    @AeroDZ 5 ปีที่แล้ว +1

    Great Video(y)

  • @abhishekganguly7695
    @abhishekganguly7695 4 ปีที่แล้ว

    Thank you !