Giter VIP home page Giter VIP logo

Comments (3)

furstj avatar furstj commented on August 25, 2024

-= is correct. I use different formulation of R in the code with respect to the article. There is a minus sign in the definition of R (see e.g. line 119 of myLusgsFOAM.C).

from myfoam.

tiandixuanhuang1 avatar tiandixuanhuang1 commented on August 25, 2024

Thank you for your prompt reply, but I don't seem to fully understand what you mean. Do you mean that the code "+=" in the file "forwardSweep. H" needs to be changed to "-="?(I have pasted the code below.)
rRho += (ac + av) * dRhoStar[own] + 0.5 * (rho1*phi1r - rho[own]*phi0r); // 0.5* Delta F*S_f rRhoU += (ac + av) * dRhoUStar[own] + 0.5 * ( (rhoU1*phi1r - rhoU[own]*phi0r) + (p1 - p[own])*Sf[faceI] ); // 0.5*(Delta F*S_f) rRhoE += (ac + av) * dRhoEStar[own] + 0.5 * (rhoE1*phi1r+p1*phi1 - (rhoE[own]*phi0r+p[own]*phi0)); // 0.5*(Delta F*S_f)

I look forward to your answer and best wishes : )

from myfoam.

furstj avatar furstj commented on August 25, 2024

Sorry, I wrote -= in my post above by mistake. It should be +=.

To be clear: the code in forwardSweep.H is correct.

My article in Computers & Fluids uses R = div( Fluxes ) and therefore, the formula in the article uses - sign.

On the other hand, the code myLusgsFoam uses R = - div(Fluxes) and therefore there is + in the forward step.

from myfoam.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.