Latest Discussions - COMSOL Forums https://www.comsol.com/forum/ Most recent forum discussions Sun, 10 Nov 2024 02:59:42 +0000 COMSOL Forum: Latest Discussions https://www.comsol.com/shared/images/logos/comsol_logo.gif https://www.comsol.com/forum/ Dripping Faucet https://www.comsol.com/forum/thread/346113/dripping-faucet?last=2024-11-10T23:30:48Z <p>I want to create a simulation model of a dripping faucet. How should I proceed with the specific steps? (I am a beginner)</p> Sun, 10 Nov 2024 02:59:42 +0000 4.2024-11-10 02:59:42.346113 Viscoelastic Flow: Poor Convergence, high Weissenberg number, Electroosmosis https://www.comsol.com/forum/thread/346112/viscoelastic-flow-poor-convergence-high-weissenberg-number-electroosmosis?last=2024-11-10T01:53:22Z <p>Has anyone else encountered the same problem?</p> <p>I know other CFD tools, e.g., OpenFOAM (RheoTool), use log conformation to deal with high Weissenberg numbers. How does COMSOL handle high Weissenberg numbers?</p> <p>I am trying to model electroosmosis using OB model. My model does not converge, even in a simple straight channel. I believe the issue is not related to the mesh or solver configuration.</p> Sun, 10 Nov 2024 01:53:22 +0000 4.2024-11-10 01:53:22.346112 Confusion regarding heat flux input https://www.comsol.com/forum/thread/346101/confusion-regarding-heat-flux-input?last=2024-11-09T22:28:23Z <p>I am trying to model how much thermal stress and thermal dissipation is generated from electromagnetic heating of a structure, I am using surface average heat flux input in each surface , giving into the heat flux data in heat transfer in solids and fluids, my first question is how accurate it is? Is there any way to actually take the heat dissipation profile generated in electromagnetic simulation to actually put into the model?</p> Fri, 08 Nov 2024 07:20:54 +0000 4.2024-11-08 07:20:54.346101 Contact model stiffness much higher than expected https://www.comsol.com/forum/thread/346092/contact-model-stiffness-much-higher-than-expected?last=2024-11-08T06:58:34Z <p>Hello,</p> <p>I am simulating a contact problem between a plastic indenter and an Ecoflex sensor involving pressing down on the sensor with a prescribed displacement or (ideally) a boundary force. However, I am finding that the sensor structure is much stiffer than expected based on a curve-fit Yeoh model from practical material testing, with forces up to approximately 60 N for a &lt;1 mm displacement on a 2 mm tall structure. I am wondering if there is an error in how I am calculating the reaction force between the indenter and the sensor, or if there is an issue with the overall model setup. I have attached a copy of the model for reference.</p> <p>The Ecoflex is modeled using a 3-parameter Yeoh hyperelastic model, and the forces obtained currently are from a surface integration of the total contact force on the indenter.</p> Fri, 08 Nov 2024 06:58:34 +0000 4.2024-11-08 06:58:34.346092 Obtaining Control Variables in MATLAB https://www.comsol.com/forum/thread/346091/obtaining-control-variables-in-matlab?last=2024-11-08T09:58:31Z <p>Hello, I am a master's student currently conducting research on topology optimization, and I have a question regarding the acquisition of control variables.</p> <p>For the topology optimization of a cantilever beam, I used COMSOL with MATLAB. In COMSOL, I conducted the forward analysis and obtained the sensitivity information. Then, using MATLAB's MMA code, I calculated a new control variable based on the control variable and sensitivity obtained earlier. I updated this new control variable in the solution (sol) using "setU()" and "createsolution," thus completing the topology optimization.</p> <p>Currently, I am working on an optimization project based on Frequency Domain analysis. I followed a similar process to the cantilever beam topology optimization; however, after model analysis, the variable obtained through "mphgetU()" did not contain the initial control variable. Upon checking in the COMSOL GUI result tab, I found that the initial control variable could be seen by selecting "static solution" under the "expression evaluated for" tab instead of "harmonic perturbation."</p> <p>In summary, although the control variable is retained after the analysis, why does the variable obtained with "mphgetU()" in MATLAB not contain the control variable?</p> Fri, 08 Nov 2024 06:21:21 +0000 4.2024-11-08 06:21:21.346091 Damping in frequency https://www.comsol.com/forum/thread/346081/damping-in-frequency?last=2024-11-08T08:13:19Z <p>Does Comsol consider any form of damping from the material in frequency domain study ? or only considered once added under Linear Elastic Material ?</p> Thu, 07 Nov 2024 22:47:57 +0000 4.2024-11-07 22:47:57.346081 EM waves signals https://www.comsol.com/forum/thread/346072/em-waves-signals?last=2024-11-11T09:06:42Z <p>Hello there,</p> <p>I have an empty steel square box, 50 cm * 50 cm * 50 cm in size, the thickness of the steel plate 2mm. I want to introduce an EM wave source inside the box, like a Gaussian pulse in the order of ns, to observe the attenuation or reflections of EM waves inside and outside the box as time goes on. Besides, there are some holes on the surfaces of the box, and as such, the EM waves should go out through the holes and spread over the outer surface of the box and surroundings. My question is, how can I define the boundary condition in my case study, with an EM source and a box? In transient, there is only the PEC boundary condition.</p> Thu, 07 Nov 2024 20:39:59 +0000 4.2024-11-07 20:39:59.346072 defining a crack front in the "From Geometry" or "Symmetric" surface definition https://www.comsol.com/forum/thread/346061/defining-a-crack-front-in-the-from-geometry-or-symmetric-surface-definition?last=2024-11-07T14:34:20Z <p>Hello,</p> <p>I want to analyze the crack growth rate in a steel machine part. When adding the crack node in COMSOL, you must define the crack surface as either "Slit" "From Geometry" or "Symmetric".</p> <p>Since my geometry doesn’t allow me to use a symmetric feature where the crack is simulated, I need to use either the "From Geometry" or "Symmetric" surface definition. In both of these modes, I’m unable to define a crack front. As a result, I also can’t add a crack front in the Virtual Crack Extension node.</p> <p>Does anyone know how to define a crack front using the "From Geometry" or "Symmetric" crack definitions?</p> <p>I am only able to work in the Solid Mechanics Module, as my university’s version does not include the Fatigue Module.</p> Thu, 07 Nov 2024 14:02:30 +0000 4.2024-11-07 14:02:30.346061 best approach of outputting to clipboard or as images https://www.comsol.com/forum/thread/346043/best-approach-of-outputting-to-clipboard-or-as-images?last=2024-11-07T14:48:46Z <p>A fast way to do this is via 'image snapshot' on the right top corner of 'graphics'. That way the font size can be controlled but the image always seems small, perhaps because 'size on screen'=1053*622 px can't be varied! How to adjust this size and make the image bigger? I hope I don't need to adjust my own pc resolution in order to resolve this.</p> Thu, 07 Nov 2024 11:38:50 +0000 4.2024-11-07 11:38:50.346043 PML in 3D https://www.comsol.com/forum/thread/346041/pml-in-3d?last=2024-11-07T11:16:35Z <p>how to add PML boundary condition on the boundaries of waveguide if i am doing boundary mode analysis in a rib waveguide</p> Thu, 07 Nov 2024 11:02:44 +0000 4.2024-11-07 11:02:44.346041 specify by vectorized view in 3D plots https://www.comsol.com/forum/thread/346023/specify-by-vectorized-view-in-3d-plots?last=2024-11-07T08:53:02Z <p>For 3D plots one can go to xy view, ... or default view, only 4 options. Can we specify by vectorized views, that is to input the angle of view with a vector?</p> Thu, 07 Nov 2024 08:53:02 +0000 4.2024-11-07 08:53:02.346023 control of plot style of main objects and grid lines https://www.comsol.com/forum/thread/346013/control-of-plot-style-of-main-objects-and-grid-lines?last=2024-11-07T08:34:15Z <p>How to control the colors and line thicknesses of the main object and grid lines in a 3D plot as in the attached? How to control the line thickness of the boundary of the attached cylinder, the color and line thickness of the grid lines? Doing this can make the background grid lines dimmer.</p> Thu, 07 Nov 2024 08:33:08 +0000 4.2024-11-07 08:33:08.346013 Envelope graph beam https://www.comsol.com/forum/thread/346011/envelope-graph-beam?last=2024-11-07T07:04:07Z <p>hello everyone, I'd like to plot the envelope of bending moment in the beam element. I set up the load case into the study, when I want to plot the graph I can see the lines for any load case but I would like the unique line (envelope), do you know how to set this one ?</p> <p>thanks</p> Thu, 07 Nov 2024 07:04:07 +0000 4.2024-11-07 07:04:07.346011 Creating Randomly Placed Cubes https://www.comsol.com/forum/thread/346002/creating-randomly-placed-cubes?last=2024-11-07T00:18:04Z <p>I am trying to create an app through app builder in which I can use assigned values within input fields to randomly generate cubes (lysosomes) inside of my defined rectangular channel with a specific material so that I can continue to run simulations. I want to click a button that is attached to a method to perform this action. I have MatLab code that creates the particles how I wanted to but I am unsure how to convert the code so that it would work in the method. I have all of my parameters linked to an input field within the app builder form as well. If using LiveLink would make more sense to do I would appreciate getting help on how to do that as well.</p> <p>Here is the working MatLab code:</p> <p>% Rectangular Prism Placement in Rectangular Area Without Overlap Script</p> <p>% Clear workspace and command window clc; clear;</p> <p>% Prompt user for dimensions of the channel length_mm = input('Enter the length of the channel (in mm): '); width_mm = input('Enter the width of the channel (in mm): '); height_mm = input('Enter the height of the channel (in mm): ');</p> <p>% Prompt user for dimensions of the lysosomes rect_length_um = input('Enter the length of the lysosome (in micrometers): '); rect_width_um = input('Enter the width of the lysosome (in micrometers): '); rect_height_um = input('Enter the height of the lysosome (in micrometers): ');</p> <p>% Convert dimensions to micrometers for calculations length_mm_um = length_mm * 1000; % mm to um width_mm_um = width_mm * 1000; % mm to um height_mm_um = height_mm * 1000; % mm to um</p> <p>% Prompt user for the number of prisms num_lysosomes = input('Enter the number of lysosomes to place: ');</p> <p>% Validate input if length_mm_um &lt;= 0 || width_mm_um &lt;= 0 || height_mm_um &lt;= 0 || num_lysosomes &lt;= 0 || ... rect_length_um &lt;= 0 || rect_width_um &lt;= 0 || rect_height_um &lt;= 0 disp('All dimensions must be positive numbers and the number of lysosomes must be a positive integer.'); else % Initialize arrays for lysosome positions lysosome_positions = zeros(num_lysosomes, 3); % Columns for x, y, z positions placed_lysosomes = 0; % Counter for placed prisms</p> <pre><code>while placed_lysosomes &lt; num_lysosomes % Generate a random position for a new rectangle x = rand() * (length_mm_um - rect_length_um); y = rand() * (width_mm_um - rect_width_um); z = rand() * (height_mm_um - rect_height_um); % Random height placement % Check for overlap with existing rectangles overlap = false; for j = 1:placed_lysosomes if (x &lt; lysosome_positions(j, 1) + rect_length_um &amp;&amp; ... x + rect_length_um &gt; lysosome_positions(j, 1) &amp;&amp; ... y &lt; lysosome_positions(j, 2) + rect_width_um &amp;&amp; ... y + rect_width_um &gt; lysosome_positions(j, 2) &amp;&amp; ... z &lt; lysosome_positions(j, 3) + rect_height_um &amp;&amp; ... z + rect_height_um &gt; lysosome_positions(j, 3)) overlap = true; break; end end % If no overlap, place the rectangle if ~overlap placed_lysosomes = placed_lysosomes + 1; lysosome_positions(placed_lysosomes, :) = [x, y, z]; end end % Plot the rectangles in 3D figure; hold on; for i = 1:placed_lysosomes % Define the corners of the rectangle in mm x = lysosome_positions(i, 1) / 1000; % Convert from um to mm y = lysosome_positions(i, 2) / 1000; % Convert from um to mm z = lysosome_positions(i, 3) / 1000; % Convert from um to mm % Create a rectangular prism using patch % Correctly define vertices for the lysosomes l = rect_length_um / 1000; % Convert length to mm w = rect_width_um / 1000; % Convert width to mm h = rect_height_um / 1000; % Convert height to mm vertices = [0 0 0; l 0 0; l w 0; 0 w 0; ... 0 0 h; l 0 h; l w h; 0 w h]; % Define vertices faces = [1 2 3 4; 5 6 7 8; 1 2 6 5; 2 3 7 6; ... 3 4 8 7; 4 1 5 8]; % Transform the lysosome to its position for j = 1:size(faces, 1) patch('Vertices', vertices + [x, y, z], ... 'Faces', faces, ... 'FaceColor', rand(1, 3), ... 'FaceAlpha', 0.5); end end % Set plot limits xlim([0, length_mm]); % Limits in mm ylim([0, width_mm]); % Limits in mm zlim([0, height_mm]); % Limits in mm % Set equal scaling for all axes daspect([1 1 1]); % Labels and title xlabel('X (mm)'); ylabel('Y (mm)'); zlabel('Z (mm)'); title('Random Placement of Lysosomes'); grid on; view(3); hold off; </code></pre> <p>end</p> <p>I also have attached pictures of what the form in my app look like. Any help on this would be greatly appreciated.</p> Wed, 06 Nov 2024 23:29:55 +0000 4.2024-11-06 23:29:55.346002 Suggestion: Selectable default colour maps https://www.comsol.com/forum/thread/346001/suggestion-selectable-default-colour-maps?last=2024-11-06T18:56:35Z <p>As per title.</p> <p>It would be great to be able to select a default colour map for each type (Linear, Symmetric and Logarithmic) in Preferences.</p> <p>It gets a bit tedious having to change every new plot from Rainbow to Viridis.</p> Wed, 06 Nov 2024 18:56:35 +0000 4.2024-11-06 18:56:35.346001 parametrize time label in plots https://www.comsol.com/forum/thread/345993/parametrize-time-label-in-plots?last=2024-11-07T08:08:12Z <p>In time dependent analysis there is a time label as in the attached. How to turn it into sth like time=T/3, time=T/2 that depends on t/T? Here the time domain t=[0,T], where T is a parameter.</p> Wed, 06 Nov 2024 09:39:12 +0000 4.2024-11-06 09:39:12.345993 Particle tracing on saved solution https://www.comsol.com/forum/thread/345991/particle-tracing-on-saved-solution?last=2024-11-06T06:40:08Z <p>I have a saved solution from a natural convection model using the Non-isothermal flow. I want to add particle tracing, is it possible to solve only for the particle tracing using the velocity field from that saved solution? If so, how can it be done?</p> Wed, 06 Nov 2024 06:40:08 +0000 4.2024-11-06 06:40:08.345991 built in operation standard deviation stddev() sample number https://www.comsol.com/forum/thread/345971/built-in-operation-standard-deviation-stddev-sample-number?last=2024-11-06T04:20:57Z <p>Hello. I extracted standard deviation of surface temperature distribution using aveop1 and stddev() built in operator in Global evaluation.</p> <p>My question is how can I know the number of the samples? What is the 'n' in COMSOL built in operator such as aveop() or stddev()? Is the number related to number of mesh of the surface?</p> <p>I appreciate any advice.</p> Wed, 06 Nov 2024 04:19:13 +0000 4.2024-11-06 04:19:13.345971 Magnetic field gradients calculation https://www.comsol.com/forum/thread/345961/magnetic-field-gradients-calculation?last=2024-11-05T19:52:44Z <p>Dear all,</p> <p>To calculate magnetic field gradient (in module Magnetic fields) Comsol uses d(laginterp(n,mf.Bx),x) function. We want to estimate gradient in a specific region in our design, so we do the function calculation at a given point. The question is, how large is the area over which gradient is calculated? Is it influenced only by neighboring points/regions? Is there a way to adjust that?</p> <p>Thank you for replies!</p> Tue, 05 Nov 2024 16:42:27 +0000 4.2024-11-05 16:42:27.345961 How to see battery pouch cell degradation in comsol https://www.comsol.com/forum/thread/345951/how-to-see-battery-pouch-cell-degradation-in-comsol?last=2024-11-05T21:43:32Z <p>Hi,</p> <p>Can anyone guide me how to see battery degradation i.e. lithium plating, dendrites formation, and internal resistance while charging and discharging with time?</p> Tue, 05 Nov 2024 14:03:32 +0000 4.2024-11-05 14:03:32.345951