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

DICAnalysis stops before the end #45

Open
AlexandreTlili opened this issue Feb 1, 2024 · 4 comments
Open

DICAnalysis stops before the end #45

AlexandreTlili opened this issue Feb 1, 2024 · 4 comments

Comments

@AlexandreTlili
Copy link

Hello @PolymerGuy and muDIC users !

I have written a little Python script to use muDIC's functions for my needs. I am simply following the tutorial; but I have added a way to manually define the mesh (without the GUI) and keep only desired images.

However, when I run a DICAnalysis job, it often happens that the routine stops before going through the whole image stack.

I have checked that the parameters I have given to the DICInput object are noconverge="ignore" and max_nr_im=None (default). If I understand the code correctly, when max_nr_im=None, its value should be set to the length of the image stack. So I do not understand why the DICAnalysis job stops sooner than expected.

Attached are my Python script compute_DIC.txt and its output.txt. In this example, the length of image stack was 720, but only the first 95 images were analyzed.

Note : I can not send a .py file on GitHub, so I sent a txt file. A screenshot of the first part of the script is also compute_DIC.

If you have any idea why the job stops, I would really appreciate your help.

Have a nice day

@Skaraa
Copy link

Skaraa commented Nov 19, 2024

Any new insight on the issue ? Got the same problem...

@PolymerGuy
Copy link
Owner

Hi! My apologies for my absence. My situation has been such that I have not been able to follow this repo as I should. My guess is that the update reference routine crashes due to distorted elements. I should obviously report a error message as that happens, but somehow this is not triggered. Can you share a picture of the mesh the frame before the reference update?

@Skaraa
Copy link

Skaraa commented Nov 21, 2024

Hi! My apologies for my absence. My situation has been such that I have not been able to follow this repo as I should. My guess is that the update reference routine crashes due to distorted elements. I should obviously report a error message as that happens, but somehow this is not triggered. Can you share a picture of the mesh the frame before the reference update?

Sure, here it is :

Figure_1

@Skaraa
Copy link

Skaraa commented Nov 21, 2024

I've also managed to log the error :

Traceback (most recent call last):
File "C:\Users\alexa\AppData\Local\Programs\Python\Python310\lib\site-packages\muDIC\solver\correlate.py", line 200, in correlate
reference = gen_ref(node_coords, mesh, images[image_id - 1], settings, image_id=(image_id - 1))
File "C:\Users\alexa\AppData\Local\Programs\Python\Python310\lib\site-packages\muDIC\solver\correlate.py", line 129, in wrapper
ref = reference_generator(*args, **kwargs)
File "C:\Users\alexa\AppData\Local\Programs\Python\Python310\lib\site-packages\muDIC\solver\reference_q4.py", line 102, in generate_reference_Q4
epE[el], nyE[el], Xe[el], Ye[el] = find_element_coordinates_q4(node_coords[0,mesh.ele[:, el]], node_coords[1,mesh.ele[:, el]], elm)
File "C:\Users\alexa\AppData\Local\Programs\Python\Python310\lib\site-packages\muDIC\solver\reference_q4.py", line 78, in find_element_coordinates_q4
ep, ny = elm_coords_from_global_q4(np.array([xnod[elm.corner_nodes], ynod[elm.corner_nodes]]).flatten(), X, Y)
File "C:\Users\alexa\AppData\Local\Programs\Python\Python310\lib\site-packages\muDIC\solver\reference_q4.py", line 57, in elm_coords_from_global_q4
nn1 = xi1(a1, b1, c1)
File "C:\Users\alexa\AppData\Local\Programs\Python\Python310\lib\site-packages\muDIC\solver\reference_q4.py", line 38, in
xi1 = lambda ai, bi, ci: 2. * ci / (-bi - (bi ** 2. - 4. * ai * ci) ** 0.5)
FloatingPointError: invalid value encountered in sqrt

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

3 participants