Latest Discussions - COMSOL Forums https://www.comsol.com/forum/ Most recent forum discussions Wed, 20 Aug 2025 22:10:59 +0000 COMSOL Forum: Latest Discussions https://www.comsol.com/shared/images/logos/comsol_logo.gif https://www.comsol.com/forum/ How to access the value of previous time step in General Form PDE (COMSOL 6.3)? https://www.comsol.com/forum/thread/368252/how-to-access-the-value-of-previous-time-step-in-general-form-pde-comsol-63?last=2025-08-20T22:30:18Z <p>Hi everyone,</p> <p>I am trying to reproduce the Phase-Field Damage + Solid Mechanics coupling using only Solid Mechanics together with a General Form PDE in COMSOL 6.3. In the built-in Phase-Field Damage model, the Equation View shows in the picture.</p> <p>i.e., the history variable Hd is the maximum between the current driving force Dd and its previous-time value Hd,old. When I implement my own PDE, I introduce a scalar dependent variable Hd and I would like to enforce the same update:Hd = max(Dd, Hd,old)</p> <p>My question is: how do I access Hd,old in a Time Dependent study in COMSOL 6.3?</p> <p>I find that someone may recommend to use pred() operator and time discrete solver. But I noticed that the solution of Phase-Field Damage + Solid Mechanics coupling can be solved by a time dependent solver, so I think PDE + Solid Mechanics can also be solved by a time dependent solver instead of a time discrete solver.</p> Wed, 20 Aug 2025 22:10:59 +0000 4.2025-08-20 22:10:59.368252 Multiphysics setting https://www.comsol.com/forum/thread/368231/multiphysics-setting?last=2025-08-20T09:02:08Z <p>Hi all, I am currently working on Charged Particle Tracing, i want to couple Electric current- frequency domain results and Magnetic field results with CPT please can anyone guide me how to do it and in CPT i am using time dependent study</p> Wed, 20 Aug 2025 09:02:08 +0000 4.2025-08-20 09:02:08.368231 Meshing in COMSOL https://www.comsol.com/forum/thread/368171/meshing-in-comsol?last=2025-08-19T11:53:00Z <p>I am using semiconductor module for photodiode simulation but getting incorrect answers which i think might be because of the mesh. The device structure is given below. can any comsol user help me out with the meshing? [https://i.sstatic.net/v8PIN7To.png]<img src="http://" alt="" /></p> Tue, 19 Aug 2025 11:53:00 +0000 4.2025-08-19 11:53:00.368171 Finished Installation - Unable to open https://www.comsol.com/forum/thread/368151/finished-installation-unable-to-open?last=2025-08-18T13:15:50Z <p>I have installed COMSOL in my MacBook Air, however after finishing all the steps I am still unable to open it and asking to complete all the steps of installation again. I have repeated it multiple times yet not able to open it</p> Mon, 18 Aug 2025 07:44:42 +0000 4.2025-08-18 07:44:42.368151 Help with Plasmonic Solar Cell Simulation in COMSOL https://www.comsol.com/forum/thread/368131/help-with-plasmonic-solar-cell-simulation-in-comsol?last=2025-08-17T19:51:01Z <p>Hi all, I’m working on plasmonic solar cells in COMSOL (v6) — focusing on how Ag/Au/Al nanoparticles affect absorption, scattering, and LSPR. Looking for guidance or shared experience with nanoparticle integration into thin-film cells. Happy to discuss authorship for meaningful help.</p> Sun, 17 Aug 2025 19:51:01 +0000 4.2025-08-17 19:51:01.368131 Average lithium concentration and hydrostatic stress - Battery degradation https://www.comsol.com/forum/thread/368112/average-lithium-concentration-and-hydrostatic-stress-battery-degradation?last=2025-08-16T00:44:54Z <p>I trying to obtain average lithium concentration and hydrostatic stress plots from my model.</p> <p>I have tried several expressions in COMSOL, but without success.</p> <p>For example, I used: c/Cmax comp1.c avg(c)/Cmax if(p > 0.95, c/Cmax, NaN) if(p > 0.95, -1, c/Cmax)</p> <p>For the hydrostatic stress, I used (a) Sh/E and also (b) if(p > 0.95, -100, Sh/E), but neither gave results consistent with those in the screenshot of the paper I attached.</p> <p>Please, could anyone advise me on the correct expressions or additional COMSOL settings that might have been applied in your simulations to obtain these plots?</p> <ol start="2"> <li><p>Regarding the deformed shape scaled by a factor of 5 (below the paper's caption), I applied this scaling in the deformation settings to 5. A screenshot of my setup is included in the attachment. I would to know if this is how to go about the scale factor.</p></li> <li><p>How can I remove the 0.95 crack regions in my average lithium concentration and hydrostatic stress plots?</p></li> <li><p>From the obtained figure from the paper, the same color grade was used throughout the figure for the lithium ion concentration, can someone tell me how I can do this settings in COMSOL?</p></li> </ol> <p>I would appreciate anyone's kind response. Thanks in anticipation.</p> Sat, 16 Aug 2025 00:44:53 +0000 4.2025-08-16 00:44:53.368112 Java class that calls a Matlab function https://www.comsol.com/forum/thread/368102/java-class-that-calls-a-matlab-function?last=2025-08-15T23:51:07Z <p>Hi,</p> <p>I am coding my Comsol simulation in Java. This simulation calls a Matlab function. Additionally, my Java class reads parameters from a text file called 'input.dat'. So I wanted to run this simulation from the terminal with the following command:</p> <p>comsolbatch -inputfile PiezoLattice.class input.dat</p> <p>However, I always get the error of not finding the Matlab file. I have placed it in the same folder of the Java class and the Matlab folder, but in both cases I get the same error. I thought in using the command 'comsolmphserver matlab', but for that I need to use a Matlab file.</p> <p>So, is it possible to have my Comsol simulation that calls a Matlab function in a Java class ?</p> Fri, 15 Aug 2025 23:51:07 +0000 4.2025-08-15 23:51:07.368102 Elasticity Matrix of PVDF-HFP https://www.comsol.com/forum/thread/368091/elasticity-matrix-of-pvdf-hfp?last=2025-08-15T17:11:54Z <p>Dear all,</p> <p>I'm trying to model the electromechanical behaviour of a PVDF-HFP (Polyvinylidene Fluoride -Hexa Fluoro Propylene) polymer film. I need the coefficients included in the elasticity matrix. Neither have I done any kind of measurement for calculating all the components of the matrix, nor could I find them in the literature. How can I solve this problem? Did anyone studied similar systems?</p> <p>It would be very appreciated if you could give me some hints.</p> <p>Thank you. Loree</p> Fri, 15 Aug 2025 12:06:18 +0000 4.2025-08-15 12:06:18.368091 Modeling Rainwater Infiltration Through Gabions in Soil (Richards Equation, COMSOL) https://www.comsol.com/forum/thread/368072/modeling-rainwater-infiltration-through-gabions-in-soil-richards-equation-comsol?last=2025-08-14T22:14:18Z <p>Hello, I am trying to model how rainwater infiltrates into soil that contains gabions (structures made of large rocks) buried in the ground.</p> <p>My goal is to design a system that collects rainwater from a roof, and directs this water into the gabions to improve infiltration into the soil.</p> <p>Unfortunately, my simulation works fine when I model only the geometry of the soil, but as soon as I add the geometry of the gabions, the transient simulation crashes and displays the error message attached.</p> <p>I am using the Richards equation with boundary conditions specific to my study site, and I have cumulative rainfall data for one year to simulate the rain falling on my system. My objective is to determine how much additional water I can infiltrate through the gabions into my system (in addition to the rain falling directly on the soil) without causing overflow.</p> <p>I’ve attached my file in case anyone can check if I’ve made a mistake, or suggest another way to carry out this study using COMSOL or another finite element simulation software.</p> Thu, 14 Aug 2025 22:14:18 +0000 4.2025-08-14 22:14:18.368072 thin film and bulk piezo materials https://www.comsol.com/forum/thread/368061/thin-film-and-bulk-piezo-materials?last=2025-08-15T17:08:16Z <p>Hi COMSOL Friends, I am trying to find the generated displacement in the piezo materials upon the applied voltage in the inverse (indirect) piezoelectric effect. I am trying to find out the generated displacement in BaTiO3 piezo material upon application of 20 V. I have created a geometry of 5 x 5 mm^2, and the thickness is 250 nm. The simulated displacement is 0.44863 nm, but the hand calculation is ~ 0.82 nm (from the general formula, Displacement = d33. V). I don't know why this happens to me. I would be truly grateful for your kind help in this regard. I am attaching the COMSOL snapshot file here. Request you pl have a look and help me. Is the thin film and bulk piezo materials affect separately on the displacement upon an application of voltage??</p> Thu, 14 Aug 2025 08:27:41 +0000 4.2025-08-14 08:27:41.368061 Skin effect in Homogenized multiturn coil and litz coil https://www.comsol.com/forum/thread/368031/skin-effect-in-homogenized-multiturn-coil-and-litz-coil?last=2025-08-13T11:47:53Z <p>Hello everyone,</p> <p>I am doing some simulations on a 2D axisymetric model, using a homogeneous coil, with 36 turns. I am confused if COMSOL simulates the skin effect in the coil turns. Using the homogenized litz coil option, and connecting both to an AC voltage source, and analysing the current for different frequencies, the current is the same in both coil cases, decreasing with frequency.</p> <p>Thanks</p> Wed, 13 Aug 2025 11:47:53 +0000 4.2025-08-13 11:47:53.368031 Demagnetization of N52 magnets in a Halbach configuration https://www.comsol.com/forum/thread/367992/demagnetization-of-n52-magnets-in-a-halbach-configuration?last=2025-08-11T17:51:01Z <p>Hello,</p> <p>I'm currently working on modeling the demagnetization of an array of N52 magnets in a cylindrical Halbach configuration using the AC/DC module. Currently I'm using the remnant magnetization model for the N52 magnets using COMSOL's materials library, but I am worried that with the field strengths being produced (well over 2 Tesla) that this system is operating far outside the linear regime for these magnets. I've attempted to model the magnets using the nonlinear permanent magnet model, with a B-H curve experimentally measured for the magnets supplied by the manufacturer, but running this simulation produces no field at all. Any help in modeling the non-linear behavior would be appreciated.</p> Mon, 11 Aug 2025 16:45:54 +0000 4.2025-08-11 16:45:54.367992 Messages: Failed to initialize physics interface https://www.comsol.com/forum/thread/367991/messages-failed-to-initialize-physics-interface?last=2025-08-11T16:04:21Z <p>When I try to load a COMSOL file into Python using "client = mph.start()" and "model = client.load("./test.mph")", I encounter the following error. Some files load without any issues, while others fail. I suspect it is not a license or version problem, but rather an issue caused by specific settings within the file itself. "Even a blank file with no components, only physics(heat transfer in solids) added causes an error when loading.</p> <p>Traceback (most recent call last): File "java.lang.Thread.java", line 0, in java.lang.Thread.run</p> <p>Exception: Java Exception</p> <p>com.comsol.util.exceptions.com.comsol.util.exceptions.FlException: Exception: com.comsol.util.exceptions.FlException: Failed to initialize physics interface. Messages: Failed to initialize physics interface.</p> Mon, 11 Aug 2025 11:19:55 +0000 4.2025-08-11 11:19:55.367991 Transient ray heating simulation in COMSOL (Ray Tracing + Heat Transfer in Solids) https://www.comsol.com/forum/thread/367981/transient-ray-heating-simulation-in-comsol-ray-tracing-heat-transfer-in-solids?last=2025-08-11T10:58:28Z <p>Hello everyone,</p> <p>I am trying to simulate the heating of a glass plate using Ray Tracing and Heat Transfer in Solids in combination with the Multiphysics node “Ray Heating”. The rays from the ray tracing act as the heat source.</p> <p>My goal is to run a time-dependent study where the glass plate is heated by a pulsed laser with 10 ms ON time and 90 ms OFF time (repeating), which is essentially a quasi-CW operation mode.</p> <p>However, I have the following problem: <strong>Single study approach</strong></p> <p>If I activate all physics in one study (see attached Model Tree / Study screenshot), the time-dependent solver does not allow me to resolve the heating process in the millisecond range. In this case, the rays appear to stop at the glass plate and the heat transfer is not computed as expected.</p> <p><strong>Two-study approach</strong></p> <p>I also tried separating the simulation into two studies: Study 1: Ray tracing (stationary) Study 2: Heat transfer in solids (time-dependent), using the Values of Dependent Variables from Study 1 as initial data.</p> <p>Unfortunately, no heating occurs in the second study, even though the ray tracing results contain nonzero gop.I and gop.Q values.alues.</p> <p>Has anyone encountered this behavior or knows how to properly set up a transient simulation with pulsed ray heating in COMSOL? Any hints on how to correctly couple the ray tracing results to the heat transfer simulation over time would be greatly appreciated.</p> <p>Thank you in advance for your help!</p> Mon, 11 Aug 2025 10:58:28 +0000 4.2025-08-11 10:58:28.367981 Releasing light from a moving particle in solution? https://www.comsol.com/forum/thread/367972/releasing-light-from-a-moving-particle-in-solution?last=2025-08-08T22:10:55Z <p>Hello, I'm attempting to model light emission from a phosphorescent particle in a fluid flow. The flow and the particle motion are no problem. Modeling the release of light however is proving to be difficult. My thought was to solve the fluid flow in a stationary manner, then use a segregated solver to first update the position of the particle within the fluid, followed by updating the position of the ray release point based on that new particle position. And that's where I'm stuck and am open to suggestions. Thanks.</p> Fri, 08 Aug 2025 22:10:55 +0000 4.2025-08-08 22:10:55.367972 Method for determining the mobility tuning parameter in phase-field modeling of two-phase flow https://www.comsol.com/forum/thread/367963/method-for-determining-the-mobility-tuning-parameter-in-phase-field-modeling-of-two-phase-flow?last=2025-08-08T14:36:32Z <p>In the Technical Support Knowledge Base, it is stated that when simulating two-phase flow problems using the phase-field method, the mobility tuning parameter can be calculated based on the velocity (as shown in the figure), rather than on the fluid viscosity, interface thickness parameter, and characteristic length scale. Is there any published reference that demonstrates the reliability of this algorithm?</p> Fri, 08 Aug 2025 14:35:21 +0000 4.2025-08-08 14:35:21.367963 Simulating Residual Stress of Thin Films on Silicon Wafer by Thickness Changing https://www.comsol.com/forum/thread/367962/simulating-residual-stress-of-thin-films-on-silicon-wafer-by-thickness-changing?last=2025-08-08T12:22:10Z <p>Hello!</p> <p>I am trying to simulate the stress (or strain) that is obtained from</p> <p>the fabrication process, and</p> <p>the experimental process (temperature evaluation).</p> <p>Initially, there is a silicon wafer. On top of it, there is a supporting SiO₂ layer. On this support layer, VO₂ is deposited using a sputtering system. I assume that all thin films inherently have an initial intrinsic stress from the deposition process. Based on previous studies, I have found that the magnitude of this stress depends on the difference in lattice parameters between the substrate and the film, as well as on the film thickness. The fabrication process is performed at room temperature.</p> <p>Moreover, after deposition, the film is tested by measuring its resistance while the temperature is increased from 25 °C to 100 °C. I would like to observe how the stress/strain in the film changes as the temperature varies.</p> <p>Currently, I am using COMSOL 5.3, and my procedure consists of the following steps:</p> <ol> <li>Fabrication Process (Goal: To show the initial stress distribution across the structure/geometry)</li> </ol> <p>I assume that the wafer has negligible (zero) stress initially. After the second film is deposited, I use the Solid Mechanics module with a Stationary study.</p> <p>I add another layer (m1) on top of the silicon wafer in the geometry.</p> <p>I set the initial stress and initial strain in the silicon to zero.</p> <p>I set the initial stress in the deposited layer to the given intrinsic stress, and the initial strain in the deposited layer to the calculated value from the lattice parameter difference:</p> <p>(lattice parameter difference, such as strain=(a_m1 - a_film1)/(a_film1) ).</p> <p>I would like to simulate cases where the top VO₂ layer has thicknesses of 10 nm, 30 nm, 50 nm, 70 nm, and 100 nm, and to show both:</p> <p>the average stress applied over the entire surface area, and</p> <p>the local stress distribution.</p> <p>There is no temperature change and no external force or strain applied to the film. So, this simulation should ideally show the stress distribution that develops in the geometry due to the deposition process — specifically, the residual stress along with the initial intrinsic stress.</p> <p>In addition, I would like to visualize stress vectors — arrows indicating the magnitude and direction of stress. I am not sure how to do this. I tried using an arrow array with (d.stress1x, d.stress1y), but the arrow directions did not match the expected theoretical results.</p> <p>My questions for this step are:</p> <p>Can the von Mises stress values obtained from this simulation be considered valid evidence of the residual stress formed in the thin film?</p> <p>Are there any additional assumptions or considerations that should be added to make this simulation more realistic?</p> <ol start="2"> <li>Experimental Process (Temperature Increase) I use the Solid Mechanics and Thermal Stress modules with a Stationary study.</li> </ol> <p>Assuming the same structure as in Step 1 (Si + SiO₂ + VO₂), I apply a temperature change from 25 °C to 100 °C to the thin-film system.</p> <p>The boundary condition is set to room temperature.</p> <p>The initial temperature is set to 100 °C.</p> <p>For the same VO₂ thicknesses (10 nm, 30 nm, 50 nm, 70 nm, 100 nm), I want to observe the average stress over the surface area and the local stress distribution as the temperature changes.</p> <p>I would like to know:</p> <p>Is this the correct way to set the temperature change in COMSOL?</p> <p>What exactly is the meaning of reference temperature and ambient temperature in COMSOL?</p> <p>General Question I would like to know if this is the best approach to obtain the stresses in the layers after a fabrication process. Is it possible to automatically use the simulation results from one step as the initial conditions for the next process step? For example, after simulating the first fabrication step, could I then add a new layer to the geometry and assign it an initial intrinsic stress while preserving the stress state of the existing layers from the previous step?</p> <p>Thank you!</p> <p>If you’d like, I can also prepare a clean, concise version optimized for COMSOL’s discussion forum style so it’s both detailed and easy for others to respond with technical advice. That would make it much more likely to get expert replies.</p> Fri, 08 Aug 2025 12:22:10 +0000 4.2025-08-08 12:22:10.367962 Need Help with Suction-Based Climbing Robot Simulation https://www.comsol.com/forum/thread/367951/need-help-with-suction-based-climbing-robot-simulation?last=2025-08-07T20:38:32Z <p>Hi everyone,</p> <p>I'm working on simulating a suction-based climbing robot using COMSOL Multiphysics. My objective is to check whether the robot will stick to a vertical surface or slip based on applied suction.</p> <p>Project Details:</p> <p>Suction pressure: –15,750 kPa applied to each suction pad</p> <p>Robot weight: 117 N</p> <p>I want to simulate how the robot behaves under gravity and suction force—whether it stays adhered or begins to slide.</p> <p>I'm confused about contact pairs and setting up proper interaction between the robot body and the wall.</p> <p>Also, deciding between stationary and time-dependent studies is a bit unclear.</p> Thu, 07 Aug 2025 20:38:32 +0000 4.2025-08-07 20:38:32.367951 Pipe flow and pump https://www.comsol.com/forum/thread/367942/pipe-flow-and-pump?last=2025-08-07T13:12:27Z <p>Hi there, can someone please share how to set a pump with inlet and outlet of a pipe flow model (gas, not liquid) with the goal of simulating the pressure losses due to elbows and pipe length, please. The flow rate and ultimate vacuum of the pump are set, trying to work out how to achieve this flow rate reduction / pressure difference drop when piping gets very long. thanks for you help. I found the liquid example in pipe, but not anything with pump and gas. any reference to some documentation is appreciated.</p> Thu, 07 Aug 2025 13:12:27 +0000 4.2025-08-07 13:12:27.367942 tcd.kappaxx-zz in the Tertiary Current Distribution governing Equations https://www.comsol.com/forum/thread/367931/tcdkappaxx-zz-in-the-tertiary-current-distribution-governing-equations?last=2025-08-07T12:49:40Z <p>Hi All,</p> <p>I took a deep dive on porous electrode reaction node equation view and i saw electrolyte conductivity term tcd.kappaxx/xy/xz/yx/.../zz. I tried find and replace (ctrl + F) for this variable but i could not find what this variable do and how does this contribute to the overall tertiary current distribution physics.</p> <p>does anyone know how COMSOL uses this term? or is it just a post-processing variable?</p> Thu, 07 Aug 2025 12:43:27 +0000 4.2025-08-07 12:43:27.367931