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.

Reusing solution displacements - should be easy... help please!

Please login with a confirmed email address before reporting spam

I have a problem which should be very straightforward but I cannot get to work.
I want to solve a 3D structural mechanics frequency domain problem, and reuse the velocity of particular surfaces in another study (of the same geometry). Whilst the structural mechanics solves ok, and I am happy with the results, I am experiencing difficulties in reusing the solution data. I have tried every combination of initial conditions, general extrusions, prescribed displacements etc etc I can think of, but cannot get it to work.

So... I have taken it right back to basics (a single plate, with a stationary load), but am no further on. Here's a simple example: if I apply a point force to a plate, I can see the resulting deformation fine. If I then create a new study, disable the force, and use the previous solution as the initial conditions, I do not see the same result. Why not? And how else can I use the displacement on a particular surface in another study?

I could not find much inspiration in the documentation or tutorial models for this, I feel like I am missing something fundamental here. I have spent days now going round in circles, so any tips/advice would be very gratefully received! Thanks!

7 Replies Last Post 28.07.2015, 10:45 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.07.2015, 10:36 GMT-4
Just to update... I think it's working now. The key was to define a variable for the surface (in each axis) and to use the nojac operator to ensure that the previous solution was used.

For example: surface_disp_u=nojac(u)
Then this variable is used directly as a prescribed displacement on the surface of interest, which I set up in a separate physics interface to the one used for the first solution.

This worked in conjunction with setting the initial condition of the dependent variables to the previous solution.

Hopefully that helps someone else in this predicament.
Thanks,
Daniel
Just to update... I think it's working now. The key was to define a variable for the surface (in each axis) and to use the nojac operator to ensure that the previous solution was used. For example: surface_disp_u=nojac(u) Then this variable is used directly as a prescribed displacement on the surface of interest, which I set up in a separate physics interface to the one used for the first solution. This worked in conjunction with setting the initial condition of the dependent variables to the previous solution. Hopefully that helps someone else in this predicament. Thanks, Daniel

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.07.2015, 11:09 GMT-4
Hi,

Some comments:

The initial value which you set in the second study is only an initial value. So without the load, the solution will bounce back to the zero state. An initial value can have either of two purposes:

1. Initial condition for a transient analysis

or

2. Provide the solver with a good initial guess for a nonlinear problem.

Here is a somewhat easier solution, which does not require two different interfaces, and no initial values. As I understand your question, you want to run two frequency domain analyses, where results from the first one act as boundary conditions for the second one.

1. Add two studies, each with a Frequency Domain study step.

2. Add a Prescribed Velocity feature which is used only in the second study, and disable the force load in that study. You can of course just as well use Prescribed Displacement, it is just a matter of choice which variable you transfer.

3. In the Prescribed Velocity, you can use the withsol() operator (new in version 5.1) to point to any other solution. The input field in the Prescribed Velocity in the x-direction should be something like withsol('sol1',solid.u_tX,setval(freq,freq)).

4. Make sure that the Prescribed Velocity (or Displacement) is switched off in the first study.

Regards,
Henrik
Hi, Some comments: The initial value which you set in the second study is only an initial value. So without the load, the solution will bounce back to the zero state. An initial value can have either of two purposes: 1. Initial condition for a transient analysis or 2. Provide the solver with a good initial guess for a nonlinear problem. Here is a somewhat easier solution, which does not require two different interfaces, and no initial values. As I understand your question, you want to run two frequency domain analyses, where results from the first one act as boundary conditions for the second one. 1. Add two studies, each with a Frequency Domain study step. 2. Add a Prescribed Velocity feature which is used only in the second study, and disable the force load in that study. You can of course just as well use Prescribed Displacement, it is just a matter of choice which variable you transfer. 3. In the Prescribed Velocity, you can use the withsol() operator (new in version 5.1) to point to any other solution. The input field in the Prescribed Velocity in the x-direction should be something like withsol('sol1',solid.u_tX,setval(freq,freq)). 4. Make sure that the Prescribed Velocity (or Displacement) is switched off in the first study. Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.07.2015, 11:15 GMT-4
Great, thanks, yes, that withsol operator sounds like just the ticket, so it's interesting that it's only just become an option!
I had some issues installing 5.1 so had stuck with 5.0, but might upgrade for that.

Thanks very much,
Daniel
Great, thanks, yes, that withsol operator sounds like just the ticket, so it's interesting that it's only just become an option! I had some issues installing 5.1 so had stuck with 5.0, but might upgrade for that. Thanks very much, Daniel

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.07.2015, 17:57 GMT-4
I had to update to use the new withsol operator, because whilst I got it working, it was only working for the last solution... the withsol allows me to specify the frequency to use. I'm very happy now it's working great for my whole frequency domain study.

One last question... I needed to specify the 'tag' for the solution. Only through some trial and error did I find that the tag I needed was "sol1", but I could not find any other reference to this. Where can I find the tag values for my solutions?

Thanks very much in advance.
Daniel
I had to update to use the new withsol operator, because whilst I got it working, it was only working for the last solution... the withsol allows me to specify the frequency to use. I'm very happy now it's working great for my whole frequency domain study. One last question... I needed to specify the 'tag' for the solution. Only through some trial and error did I find that the tag I needed was "sol1", but I could not find any other reference to this. Where can I find the tag values for my solutions? Thanks very much in advance. Daniel

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 28.07.2015, 02:18 GMT-4
Hi,

If you right-click on the Solution node and select Properties, you will see the tag.

Alternatively, you can switch on the display of all tags. With the rightmost icon at the top of the Model Builder pane you can control the annotation of the nodes in the model tree.

By the way, the syntax

withsol('sol1',solid.u_tX,setval(freq,freq))

may look a bit obscure. The first 'freq' indicates that you want to pick results at a certain frequency in the old solution (sol1). The second 'freq' is the current frequency in the frequency sweep you are solving for in the second study..

By using

withsol('sol1',solid.u_tX,setval(freq,123.4))

you would pick the old result at the single frequency 123.4 Hz.

Regards,
Henrik
Hi, If you right-click on the Solution node and select Properties, you will see the tag. Alternatively, you can switch on the display of all tags. With the rightmost icon at the top of the Model Builder pane you can control the annotation of the nodes in the model tree. By the way, the syntax withsol('sol1',solid.u_tX,setval(freq,freq)) may look a bit obscure. The first 'freq' indicates that you want to pick results at a certain frequency in the old solution (sol1). The second 'freq' is the current frequency in the frequency sweep you are solving for in the second study.. By using withsol('sol1',solid.u_tX,setval(freq,123.4)) you would pick the old result at the single frequency 123.4 Hz. Regards, Henrik

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 28.07.2015, 10:36 GMT-4
Hi Henrik

Thanks for the clarifications, these new built-in operators are explained at p227++ in the COMSOL Reference Manual V5.1 and in the Help, but its always easier to see them in use in several examples :)

--
Good luck
Ivar
Hi Henrik Thanks for the clarifications, these new built-in operators are explained at p227++ in the COMSOL Reference Manual V5.1 and in the Help, but its always easier to see them in use in several examples :) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 28.07.2015, 10:45 GMT-4
Yes, thanks for all the clarifications. My results are looking good now :-)

I find the reference help is good if you know what you're looking for, but sometimes I don't really know what I'm looking for, and/or what kind of modelling routes to explore! There is no substitute for hands-on experience.
Yes, thanks for all the clarifications. My results are looking good now :-) I find the reference help is good if you know what you're looking for, but sometimes I don't really know what I'm looking for, and/or what kind of modelling routes to explore! There is no substitute for hands-on experience.

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.