Modify field variable (Pressure)

Please login with a confirmed email address before reporting spam

Hello, I want to modify a pressure value at a specified node and use it as the initial value for the stabilized Convection-Diffusion Equation. I can access the field data in Livelink for MATLAB through: pd = mpheval(model, 'p0', 'dataset', 'dset1');

I changed the pressure value as follows: p0_modi = pd;
p0_modi.d1(1,1) = 3;

Since I want to use the modified p0 ("p0_modi.d1"), I tried to set it again through: model.variable('var17').set('p0', p0_modi.d1);

However, due to the unacceptable data type for the .set function, it doesn't work. How can I use "p0_modi" for the p0 variable?


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.