Open JanGaertner opened 2 years ago
From Version 4.0 to 4.1 the own math functions to calculate the reference space have changed. Before the function to calculate the eigenvalues of a matrix was not generally valid for all 3x3 matrices. This has been fixed in Version 4.1 and now mirrors more the behavior of the LAPACK library. Therefore maybe something small changed with the reference frame, which then changes the transformation matrices.
When I run the test with OpenFOAM v2012 I have no invalid cells for the cavity tutorial. For the wedge case I get the same message of 100% invalid. This is however due to the wedge mesh and I have encountered this error also for previous versions. To circumvent this the checkCondition option can be set to false, then the condition of the central stencil is not checked. If the simulations still run stable it is also no problem to set this option.
If you want you can also check if the result changes when you use the LAPACK library.
Hope this helps understanding it better.
Hello Jan,
Thank you for reply and suggestion 😄 . Based on your recommendation, I am running some tests and glad to share my progress with you here.
I tested OpenFOAM v2012/v2106 and WENOEXT 4.0(b6f4978)/4.1(f45593a)
a. You are right. Using the LAPACK library, the cavity case run by both v2012 and v2106 with 4.0/4.1 show no invalid cells. It seems that this problem does relate to the math function. b. For wedge case, I got 100% invalid cells for all the tests as well. This is quite interesting. I am still tring to figure out why. c. I build my own test case of classical incompressible periodic channel flow (PCF). I tested it on my local machine with a small mesh version (200k cells) but got the same number of invalid cells both with 4.0 and 4.1 (LAPACK ON, v2106). The mesh have passed the checkmesh test. Right now I'm not sure if the problem is due to the grid or boundary condition. And I'm not so sure that invalid cells would affect the results. Therefore, I plan to run a full version on our HPC platform with v2012 and 4.1 next week. Hopefully I'll have some valuable results to share by then. log.PCF.WENO4.0.txt log.PCF.WENO4.1.txt d. There is a computation error in the PCF case of 4.0, but I think it is not relevant to the current problem and plan to leave it to be solved in the future if I have time .
To further determine the cause and effect of invalid cells, I may need some of your help. The relevant files under WENOBase seem to be stored in binary format. I used some tools to convert them to ASCIl, but none of them work. Is there any way to make these files human-readable? In addition, I found that when the number of invalid cells exceeded a certain number, the log stopped printing the cell ID. Is there a way to output complete information about these cells so I can locate them, for example in ParaView?
Best,
Fracturist
Hello Fracturist,
the binary format should be able to be converted back into OpenFOAM ASCII lists. However, even in ASCII format the files are very difficult to read, especially the matrices, due to the List of Lists format OpenFOAM uses. But you can do the following:
writeStencilCells -help
OFstream::streamFormat::BINARY
to OFstream::streamFormat::ASCII
in:
https://github.com/WENO-OF/WENOEXT/blob/f45593abd480d9f1ea2056cefd2f6626bebab497/libWENOEXT/WENOBase/WENOBase.C#L1265-L1312Thank you very much, Jan. This information is very helpful 👍
Once I have any progress I will post here.
Hello, Jan. I have also encountered this problem. My case is simulating a 1D traveling sine wave in periodic domain using scalarTransportFoam without diffusion. The result shows very high numerical dissipation compared to the linear scheme. Is it actually not performing weno scheme if I have the '100% invalid cells' message? I guess it was performing upwind scheme, because the upwind scheme also had very high numerical dissipation result.
Hello, Jan. I have also encountered this problem. My case is simulating a 1D traveling sine wave in periodic domain using scalarTransportFoam without diffusion. The result shows very high numerical dissipation compared to the linear scheme. Is it actually not performing weno scheme if I have the '100% invalid cells' message? I guess it was performing upwind scheme, because the upwind scheme also had very high numerical dissipation result.
Hi, Lin. If your case is the linear advection equation with sine wave as the initial value, I suggest you make a comparison between upwind scheme and a series of WENOUpwindFit schemes after some periods. If the results are basically the same at different time, this is a fast way to check whether WENOEXT performed well or not.
Hello,
have you switched off the condition check in the control settings as stated in the README?
If it is switched on then you will have an Upwind Scheme.
checkCondition false;// Check the condition of the pseudo inverse matrix
// If the central stencil has at least one zero entry
// the matrix is removed for all stencils of this cell.
Hello,
I previously tried to turn checkCondition
off, but at that time I thought the it only ignored the message. Now after turning the checkCondition
to false again and visualizing the wave, the numerical dissipation looks as expected. Thank you!
Discussed in https://github.com/WENO-OF/WENOEXT/discussions/46