vitst / dissolFoam

Solves for flow (Stokes) and transport (steady-state) and moves the mesh according to the reactant flux.
11 stars 2 forks source link

Unable to simulate the dissolution process of large roughness fractures #1

Open kai1-li opened 4 years ago

kai1-li commented 4 years ago

I encountered a problem when using the large roughness fracture model to simulate the dissolution process.

1.First, I use seededFracture as a template. 2.Replace the fracture model with a larger roughness model(as follows), and change the corresponding parameters. picture1 picture2 3.Then use dissolFoam to solve, but the following error occurred during the operation.

[11] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [11] #1 Foam::sigFpe::sigHandler(int) at ??:? [11] #2 ? in "/lib64/libpthread.so.0" [11] #3 Foam::GaussSeidelSmoother::smooth(Foam::word const&, Foam::Field&, Foam::lduMatrix const&, Foam::Field const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList const&, unsigned char, int) at ??:? [11] #4 Foam::GaussSeidelSmoother::smooth(Foam::Field&, Foam::Field const&, unsigned char, int) const at ??:? [11] #5 Foam::smoothSolver::solve(Foam::Field&, Foam::Field const&, unsigned char) const at ??:? [11] #6 ? at ??:? [11] #7 ? at ??:? [11] #8 ? at ??:? [11] #9 ? at ??:? [11] #10 __libc_start_main in "/lib64/libc.so.6" [11] #11 ? at ??:? srun: error: n0139: task 11: Floating point exception

Is there any solution?

tonyladd commented 4 years ago

We never had in mind such a rough fracture. Is the mesh good? What is the output from checkMesh? It looks to me as if some of the grid lines may be crossing.

The rough fracture initialization we used starts with a regular grid and just displaces the points. So the cells in your example are very distorted. You might be able to mesh this kind of surface with snappyHexMesh though.

1) Make a stl file of the fracture surfaces. You can do this with some CAD application what makes a triangular mesh of the two surfaces, or you might be able to write the surface from what you have already with surfaceMeshTriangulate. Check the stl surface with paraview before going on.

2) Then make a regular mesh with blockMesh that encloses your fracture.

3) Make the final mesh with snappyHexMesh using the stl file for the surface. That will keep most of the cells hexahedral.

4) Run checkMesh to make sure its OK.

The case dissolCirc uses this process.

Finally, I would try to get where you want in stages. But you should work with SHM rather than trying to just move points (as we did).

Good luck

Tony

kai1-li commented 4 years ago

Hello Tony,

First of all, thank you very much for your answers.

I followed your suggestion and used snappyHexMesh to generate the fracture mesh. Run checkMesh and mesh is no problem. This time I used a smoother fracture surface, as shown in the picture. P1 However, after running for a period of time, the surface mesh has not been relaxed and the mesh intersects. P2 In addition, I used Gambit to generate a hexahedral mesh,and mesh is no problem. But the same problem appeared after running for a period of time. P3 May I ask what caused this?

Best Regards, Kai

vitst commented 4 years ago

Hi Kai, What version of the dissolFoam do you use? Is it the one from release? Also, you mentioned that you built your case on seededFracture then it must be the normalMotionSlip in pointMotionU, that governs your relaxation. In the output you should see a line for relaxation laplacian solver right after convection-diffusion solver output, for example: velocity laplacian: Converged in 5 steps. Residual = 0.00971551444 How many steps it relaxes the mesh in your case?

What is the value in constant/dynamicMeshDict for the tolerance?

You need to take into account that the algorithm has its limitation because of the internal mesh (if the topology changes significantly).

Vitaliy

tonyladd commented 4 years ago

Kai

A couple of things in addition to Vitaliy's comments.

1) Perhaps dt is too big. If the points move too far in one step then the relaxation cannot function properly. 2) You have a lot of sharp angles in your surface. Is this strictly necessary? It will make the mesh relaxation fail. It is looking for a smooth surface. Given your resolution I think the surface could be a lot smoother. Have you tried filtering it? Notice that the places where the mesh is failing is related to places where the surface is not C_1 continuous - ie the derivatives are discontinuous. dissolFoam can cope with a small amount of discontinuity but you are making it very large.

I really recommend you try some smoother problems and see if they will work.

Tony

Darezhat commented 3 years ago

Hi everyone! Do you know how to run dissolFoam in OpenFoam-v2012

vitst commented 3 years ago

Hi @Darezhat. You should be able to run dissolFoam using OpenFoam-v2012. To do that, additionally, you will need to clone and compile libraries from libsFoamAux and checkout the of2006 branch:

git clone https://github.com/vitst/libsFoamAux.git
cd libsFoamAux
git checkout of2006
./Allwmake
cd ..

Then clone and compile the current solver (default master branch will work):

git clone https://github.com/vitst/dissolFoam.git
cd dissolFoam
wmake
cd ..

At this point you got all the machinery to run dissolFoam. We created a number of examples at dissolCases. They are mostly valid but might need some tuning for the latest OpenFOAM, since the OpenFOAM is an intensively developing software, and we just don't have resources to update everything to the latest release. The good news is that the changes are always minor. Thus, reading the error messages you will be able to make it working. I updated one of the cases for the fracture dissolution seededFracture-v2012 and pushed it to the develop branch.

git clone https://github.com/vitst/dissolCases.git
cd dissolCases
git checkout develop
cd seededFracture-v2012
./Mesh
./Run

It should give you an example how dissolFoam works. Then you can switch to your own geometry or boundary conditions. Make sure that you choose correct parameters such as diffusion, reaction rate constant. The details have been described in our publications:

Good luck! Vitaliy

Darezhat commented 3 years ago

Hello! Thank you for your response and help! I tried to follow this instruction and tried to fix errors with but I had some troubles related to the compilation of libraries. Error is "tiffio.h - no such file or directory". Could you help me again, please?

vitst commented 3 years ago

@Darezhat You need to install tiff library. For example, if you are running Ubuntu system, you need to get libtiff-dev: sudo apt install libtiff-dev

In any case, this particular library that you get an error with is for post processing. It will not affect dissolFoam.

Darezhat commented 3 years ago

Thanks for your help and time! If I manage to figure it out and use it for my task, then I will definitely cite your articles. I'm sorry for taking your time, but I got another error when I run dissolFoam in dissolFoam.C: "steadyStateControl.H: No such file or directory". How do I download this library?

tonyladd commented 3 years ago

Probably because you do not have the link to the header file. There is a script in libsFoamAux - mkInclude - that creates the links. It should run with Allwmake, but see if the links are in the correct place: in the directory lnInclude alongside libsFoamAux. Also check if the include in dissolFoam's make/options is pointing to the lnInclude dir.

Tony

On 3/3/21 12:40 AM, Darezhat wrote:

[External Email]

Thanks for your help and time! If I manage to figure it out and use it for my task, then I will definitely cite your articles. I'm sorry for taking your time, but I got another error when I run dissolFoam in dissolFoam.C: "steadyStateControl.H: No such file or directory". How do I download this library?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_vitst_dissolFoam_issues_1-23issuecomment-2D789449035&d=DwMCaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=kgFAU2BfgKe7cozjrP7uWDPH6xt6LAmYVlQPwQuK7ek&m=pO3VptaQ6o72h6NbhdEnLtxUXnT5CJFGE9sAOMix--0&s=Hj86yJC8Q-FvzEG7O8Zqj4M5oLnSX3ozrvGrqZq8hhY&e=, or unsubscribe https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACNEWC2HRNVELKBXWZ2JSQLTBXDUFANCNFSM4PZB7BLA&d=DwMCaQ&c=sJ6xIWYx-zLMB3EPkvcnVg&r=kgFAU2BfgKe7cozjrP7uWDPH6xt6LAmYVlQPwQuK7ek&m=pO3VptaQ6o72h6NbhdEnLtxUXnT5CJFGE9sAOMix--0&s=sIUP0u3TJVgLYTRHh652PTlD8x2dbUw4Bv3KfREjq5o&e=.

-- Tony Ladd

Chemical Engineering Department University of Florida Gainesville, Florida 32611-6005 USA

Email: tladd-"(AT)"-che.ufl.edu Web http://ladd.che.ufl.edu

Tel: (352)-392-6509 FAX: (352)-392-9514

vitst commented 3 years ago

@Darezhat I will just add a little bit to @tonyladd comment. Most probable, the error is in the dissolFoam directory in file Make/options. The include paths is specified in EXE_INC. The last line there is -I../../lnInclude. This is the path to the directory lnInclude that is created during compilation of libraries. It is specified as a relative path, so you need to specify the correct path to yours. I think, if you followed my description above how to compile everything, you will probably need to change it to -I../lnInclude. Try that.

Darezhat commented 3 years ago

Thank you so much! You helped me a lot! I tried seededFracture case and it worked. Now I'm going to modify the geometry and also want to try the disk Case for 2012 version.