How to solve electrical conductivity (laplaces Equation) ?

14 views (last 30 days)
I have a 2D Model of a Brain with a scalp layer, stroke layer, brain layer and skull.
Each region has its own conductivity. I have specified conductivity, for Laplaces equation, as:
model = createpde();
specifyCoefficients(model,'m',0,'d',0,'c',1.1,'a',0,'f',0,'Face',2);
specifyCoefficients(model,'m',0,'d',0,'c',-0.03,'a',0,'f',0,'Face',1);
specifyCoefficients(model,'m',0,'d',0,'c',-1,'a',0,'f',0,'Face',3);
%Stroke
specifyCoefficients(model,'m',0,'d',0,'c',-3,'a',0,'f',0,'Face',4);
generateMesh(model,'Hgrad',1,'Hmax',0.05)
----------------------------------------------------------------------------------------------------------------
I solve this with solvepde()
When I apply a current pattern to this EIT setup (applyBoundaryConditions), I get voltages in the range of 1e12, which is very inaccurate. I also get badly scaled vector warnings. I am not sure what is happening. Do I need to individually assign the conductivity to each node of the electrode? Is my current pattern incorrect? Please feel free to ask questions if this is unclear as I was unsure of how much to elaborate.

Answers (1)

Abhimenyu
Abhimenyu on 27 Oct 2023
Hi Shraddha,
I understand that you are getting inaccurate ‘voltage ranges’ and ‘badly scaled vector’ warnings while solving the ‘Laplace’ equation using MATLAB’s ‘PDE’ toolbox.
Please find below some causes and solutions to address the problems:
  1. Conductivity Scaling: Conductivity values are crucial, and improper scaling can lead to inaccurate results. One possible cause of the irregularities might be the presence of a singular matrix in the system of equations. This can happen because of zero or negative conductivities in the model which are not physically meaningful. Please use positive conductivities for all the regions in the model, making sure they are consistent with the units of your current pattern and boundary conditions.
  2. Boundary Conditions and Current Pattern: Please make sure that the boundary conditions have been correctly set, especially when applying a current pattern. The above-mentioned warnings can arise if a large current density is applied to the electrodes, which could result in a large potential difference across the model. This can be managed by reducing the magnitude of the current pattern or increasing the area of electrodes. The current pattern should be balanced, which means the total current injected into the model is equal to the total current extracted from the model.
  3. Mesh Quality: The mesh quality can have a significant impact on the accuracy and stability of the numerical solution. Please ensure that the mesh is fine enough to capture the features of interest. Please try to refine the mesh by reducing the 'Hmax' value in the 'generateMesh()' function or use a different meshing algorithm like 'adaptive mesh refinement' provided by MATLAB's 'adaptmesh' function. The mesh can be visualized using the 'pdeplot' function to check any irregularities or errors.
  4. Scaling of the PDE: The unit of the problem might not match the assumed unit of the solver. Please ensure that your model is consistent with the solver's unit. This can sometimes lead to badly scaled vector warnings.
Please follow the above troubleshooting suggestions to improve your model and achieve better results.
For more understanding on ‘pdeplot’ function and ‘adaptmesh’ function, please follow the below-mentioned MATLAB documentation links respectively:
I hope this helps to resolve your issue,
Thank you,
Abhimenyu.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!