issues in expanding the "hydrogen diffusion in metals" example to an axisymmetric model

Please login with a confirmed email address before reporting spam

Hello,

I'm a novice COMSOL user, so please excuse my lack of expertise.

I'm attempting to adapt the "Hydrogen Diffusion in Metals" example to an axisymmetric model. Specifically, I want to simulate stress-induced hydrogen diffusion in a cylindrical tensile specimen as it begins to neck.

I successfully modeled the necking behavior using the "Voce" plasticity model. Following the example, I incorporated hydrogen diffusion into the simulation. However, I encountered an issue when modifying the External Flux expression.

In the original 2D example, the External Flux is defined as: D_sigma * d(-solid.pm, X) * para

For the axisymmetric model, I changed it to: D_sigma * d(-solid2.pm, X) * para

I assumed this change was necessary because the solid.pm variable is unavailable in axisymmetric simulations.

After making this adjustment, I ran the simulation but encountered the following error:

"Feature: Time-Dependent Solver 1 (sol1/t1) The second argument of the d() operator must be a variable name."

The only differences between the example and my setup are:

  1. The modified External Flux expression mentioned above.
  2. My simulation runs from 0 to 1 seconds with 0.01-second increments. The specimen deformation ramps from 0 to 6 mm during this time.

I would greatly appreciate any guidance on resolving this issue.

Thank you, Rashiga


1 Reply Last Post 2 gen 2025, 16:02 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 2 months ago 2 gen 2025, 16:02 GMT-5
Updated: 2 months ago 2 gen 2025, 16:55 GMT-5

It took me some time to realize what was wrong, with d() operator in the equation for the external flux. I was not using cylindrical coordinate system. After changing X and Y to R and Z now the simulation computes. However, there's no mass transfer which I need to resolve.

It took me some time to realize what was wrong, with d() operator in the equation for the external flux. I was not using cylindrical coordinate system. After changing X and Y to R and Z now the simulation computes. However, there's no mass transfer which I need to resolve.

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.