Accessing Stiffness Matrices and Internal Force Vectors for Incremental Solution in COMSOL

Please login with a confirmed email address before reporting spam

Hello COMSOL Community,

I'm currently working on a phase-field fracture problem and trying to implement a custom solver that follows a Newton-Raphson iteration scheme with arc-length control, similar to what is shown in the attached image (equation 17a and 17b).

I need to access the stiffness matrices (K_uu, K_φφ, etc.) and the internal force vectors (f_int,u, f_int,φ) in COMSOL in order to calculate the solution increments (Δu, Δφ, Δλ) at each iteration. I am aware that quantities like displacement (solid.uf) and damage (solid.dmg) can be accessed, but I'm unsure how to retrieve the stiffness matrices and internal force vectors.

I would like to use them in a custom script, potentially via the mph package or COMSOL's Java API.

Thank you!



5 Replies Last Post 2024年9月13日 GMT-4 08:35
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 months ago 2024年9月3日 GMT-4 03:00
Updated: 3 months ago 2024年9月3日 GMT-4 10:54

The path on which you plan to embark is probably quite difficult.

If possible, I suggest that you first look at something similar to the method used in this example:

https://www.comsol.com/model/postbuckling-analysis-using-an-incremental-arc-length-method-119001

-------------------
Henrik Sönnerlind
COMSOL
The path on which you plan to embark is probably quite difficult. If possible, I suggest that you first look at something similar to the method used in this example:

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年9月12日 GMT-4 08:15

Thank you for the example provided and for pointing me in the right direction. I’m interested in understanding how to implement methods created in the Application Builder and then use or call these methods in Model Builder.

Could you provide guidance or resources !

Thank you for the example provided and for pointing me in the right direction. I’m interested in understanding how to implement methods created in the Application Builder and then use or call these methods in Model Builder. Could you provide guidance or resources !

Amit Suresh Patil COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年9月12日 GMT-4 09:36
Updated: 2 months ago 2024年9月12日 GMT-4 09:37

Hi Aida,

Please have a look on the following links for more details

  1. https://www.comsol.com/video/automating-your-modeling-workflow-with-model-methods-in-comsol
  2. https://doc.comsol.com/6.2/docserver/#!/com.comsol.help.comsol/application_builder_manual_method_editor.11.01.html

Amit Patil COMSOL

Hi Aida, Please have a look on the following links for more details 1. [https://www.comsol.com/video/automating-your-modeling-workflow-with-model-methods-in-comsol](https://www.comsol.com/video/automating-your-modeling-workflow-with-model-methods-in-comsol) 2. [https://doc.comsol.com/6.2/docserver/#!/com.comsol.help.comsol/application_builder_manual_method_editor.11.01.html ](https://doc.comsol.com/6.2/docserver/#!/com.comsol.help.comsol/application_builder_manual_method_editor.11.01.html) ------------------- Amit Patil COMSOL

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年9月13日 GMT-4 07:54

Hi Amit,

Thank you for sharing the links. I would need some additional support, specifically with implementing module method related to mesh variables for my coding needs. "https://doc.comsol.com/5.5/doc/com.comsol.help.comsol/comsol_ref_definitions.12.032.html#1764134"

Could you please assist me with this? Any further guidance would be greatly appreciated.

Thank you!

Hi Amit, Thank you for sharing the links. I would need some additional support, specifically with implementing module method related to mesh variables for my coding needs. "https://doc.comsol.com/5.5/doc/com.comsol.help.comsol/comsol_ref_definitions.12.032.html#1764134" Could you please assist me with this? Any further guidance would be greatly appreciated. Thank you!

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2024年9月13日 GMT-4 08:35

Dear Aida,

To request technical support from COMSOL employees, please use the support portal on your Access account, if your license is eligible for this service.

Best regards,

Jeff

-------------------
Jeff Hiller
Dear Aida, To request technical support from COMSOL employees, please use the support portal on your Access account, if your license is eligible for this service. Best regards, Jeff

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.