Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Access Stiffness Matrix for each Parameter Sweep Value
Posted Mar 14, 2024, 6:42 a.m. EDT LiveLink for MATLAB, API, Studies & Solvers Version 6.2 1 Reply
Please login with a confirmed email address before reporting spam
Hi all,
I am trying to read stiffness matrix through Java. Currently, I am mostly following codes given in COMSOL Programming Reference Manual, which is: (1) create Assemble under my Solution 1 and (2) getSparseMatrixVal('K'), which gives me the global stiffness matrix.
This method works perfectly for Static problem, when I am using Stationary step with Stationary solver. However, if I include parametric sweep, I can only access to the stiffness matrix produced by the last parameter sweep.
For example: imagine a parameter p with values 1, 2, and 3. There is a Parametric attribute added under the Stationary Solver, which changes the parameter value through 1, 2 and 3. Let's assume, that Young's modulus depends on parameter p. Hence, the stiffness matrix of the element will change as the parameter p changes. However, I can only access the stiffness matrix for the last parameter p value, that is p = 3.
Does anyone know how can I access and read stiffness matrices for all of the parameter values? Unfortunately, I could not find any information in the manual.
Sincerely, Irakli