Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sinwave case: rhoPimpleFoam vs lusgsFoam (Euler & forward ddt scheme) #7

Open
jiaqiwang969 opened this issue Feb 14, 2022 · 7 comments

Comments

@jiaqiwang969
Copy link

jiaqiwang969 commented Feb 14, 2022

Hi, furstj
I am quite interested in your work. I compared rhoPimpleFoam and lusgsFoam solver. The results could be found here.

Some Concerns:

  • lusgsFoam with forward ddt scheme is broken, which I cannot comprare with rhoPimpleFoam (forward) case.
  • rhoPimpleFoam seems more non-linear than lusgsFoam. see Euler case. (Upper and lower waveform asymmetry in rhoPimpleFoam, but symmetry in lusgsFoam)

Any ideas or suggestions for improving my cases?

@furstj
Copy link
Owner

furstj commented Feb 14, 2022

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.

@jiaqiwang969
Copy link
Author

Sorry,Written error, I mean backward.

@furstj
Copy link
Owner

furstj commented Feb 14, 2022

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.

@jiaqiwang969
Copy link
Author

jiaqiwang969 commented Feb 14, 2022

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~

@jiaqiwang969
Copy link
Author

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.

@jiaqiwang969
Copy link
Author

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.

@furstj
Copy link
Owner

furstj commented Feb 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants