Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Rotation of vector field in Comsol

Please login with a confirmed email address before reporting spam

Hello,

I intend to rotate the displacement vector field solution in Comsol. I have a C6 symmetric structure, and I want to rotate the solution by 60 degrees.

I tried to do the same via Sector3D option in datasets. But, Comsol only rotates the coordinates of the vector fields, and not the vector field itself. Please find attached the pdf file to better understand my objective.

Could somone help me in rotating the vector field in Comsol?

Best Regards, Tirth



4 Replies Last Post 26 nov. 2018, 06:55 UTC−5
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 23 nov. 2018, 10:22 UTC−5
Updated: 6 years ago 23 nov. 2018, 10:23 UTC−5

The Sector 3D data set should rotate vector fields in plots where you enter a vector field. Do you have the Structural Mechanics module? If yes, then you can try the following:

  • Open the free cylinder model.
  • Add a 3D Plot Group.
  • Change the Data set in the plot group to Sector 3D 1.
  • Add an Arrow Surface plot. The default expression (u3, v3, w3) is the displacement.
  • Plot: The field is rotated.

The Sector 3D data set only transforms vectors when you evaluate vectors, not when you evaluate scalars.

The Sector 3D data set should rotate vector fields in plots where you enter a vector field. Do you have the Structural Mechanics module? If yes, then you can try the following: * Open the free cylinder model. * Add a 3D Plot Group. * Change the Data set in the plot group to Sector 3D 1. * Add an Arrow Surface plot. The default expression (u3, v3, w3) is the displacement. * Plot: The field is rotated. The Sector 3D data set only transforms vectors when you evaluate vectors, not when you evaluate scalars.

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 23 nov. 2018, 11:30 UTC−5

Hi Gunnar,

Thank you for the quick reply! Yes, indeed, it works for the vector fields even in my model. Please find attached the mph file for my model.

But, when I plot the Surface plot of x component of displacement (u) in PlotSurface3D, I find that the colour plot is simply rotated by 60 degrees for Sector3D. It should not be the case if the complete vector field is rotated.

For Sector3D, I am rotating the Solution computed by Comsol. I am not sure whether it considers it as a scalar or a vector field.

Best Regards, Tirth

Hi Gunnar, Thank you for the quick reply! Yes, indeed, it works for the vector fields even in my model. Please find attached the mph file for my model. But, when I plot the Surface plot of x component of displacement (u) in PlotSurface3D, I find that the colour plot is simply rotated by 60 degrees for Sector3D. It should not be the case if the complete vector field is rotated. For Sector3D, I am rotating the Solution computed by Comsol. I am not sure whether it considers it as a scalar or a vector field. Best Regards, Tirth


Please login with a confirmed email address before reporting spam

Posted: 6 years ago 23 nov. 2018, 11:37 UTC−5

Hi Gunnar,

I want to export the data with the rotated vector field. Even in the exported dataset, only the coordinates of the vectors are rotated, and not the vectors itself.

Best Regards, Tirth

Hi Gunnar, I want to export the data with the rotated vector field. Even in the exported dataset, only the coordinates of the vectors are rotated, and not the vectors itself. Best Regards, Tirth

Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 26 nov. 2018, 06:55 UTC−5

The data export evaluates all expressions as scalars.

As a workaround I suggest that you create an arrow plot and export plot data for the arrow plot.

The data export evaluates all expressions as scalars. As a workaround I suggest that you create an arrow plot and export plot data for the arrow plot.

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.