Coder Social home page Coder Social logo

Comments (7)

jiaqiwang969 avatar jiaqiwang969 commented on May 22, 2024 1

Sorry,Written error, I mean backward.

from myfoam.

jiaqiwang969 avatar jiaqiwang969 commented on May 22, 2024 1

Well, you have to use more internal iterations then. You should try to find a good compromise between speed and accuracy obtained with higher number of iterations and computational time.

I will try it.

It converged when iteration set to 50, and waveform becomes symmetry which is better than rhoPimpleFoam with same time setting.

from myfoam.

furstj avatar furstj commented on May 22, 2024

Hi @jiaqiwang969

the LU-SGS scheme is not compatible with forwrd ddt (I mean the explicit Euler). It has to be used with an implicit ddt (i.e. Euler or backward). In the case of time-dependent problems the solver uses dual time stepping technique, i.e. it should use more internal iterations. I run your sinwave case wit lusgs + backward ddt with following (sub-optimal) setup inside fvSolution:
LUSGS { internalIterations 10; localTimestepping true; relTol 1.e-3; tolerance 1.e-4; }
Note that I didn't try to "optimize" the number of internal iterations or tolerances. May be that the code will run with fever internal iterations as well.

In any case, the LU-SGS solver aims to implicit time stepping for steady state or quasi-steady problems with large time steps. For the sine wave I would recommend rather the rhoCentralFoam or an explicit dbns solvers.

from myfoam.

furstj avatar furstj commented on May 22, 2024

Well, you have to use more internal iterations then. You should try to find a good compromise between speed and accuracy obtained with higher number of iterations and computational time.

from myfoam.

jiaqiwang969 avatar jiaqiwang969 commented on May 22, 2024

Yes, the backward case works now, I have concluded it again.

  1. for Euler method, LU-SGS solver is effective, 34.11 s vs 142.55s (rhoPimpleFoam). However, 184s vs 153.13 for backward method.
  2. At the moment, I am still very sceptical about the correctness of the results, even if they are BACKWARD, and for LU-SGS the amplitude of probe signal even increases gradually, which seems unreasonable.

As your suggestion, I will keep on with dbns solver.
Thanks~

from myfoam.

jiaqiwang969 avatar jiaqiwang969 commented on May 22, 2024

Well, you have to use more internal iterations then. You should try to find a good compromise between speed and accuracy obtained with higher number of iterations and computational time.

I will try it.

from myfoam.

furstj avatar furstj commented on May 22, 2024

Very good. On the other hand with 50 iterations the LUSGS would be deadly slow. In any case, the explicit dbns (foam extend?) would be better choice for this kind of problems.

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.