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.

withsol operator

Please login with a confirmed email address before reporting spam

Hi,

I have a question regarding the withsol operator. Where should I define it? Is it defined in the solver or as part of a dataset? The documentation prodived by Comsol is very clear as to how to define it but it doesn't explicitly say where to define it.

Does anyone know?

Thank you.


4 Replies Last Post 24 avr. 2021, 16:12 UTC−4
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 22 avr. 2021, 14:01 UTC−4

Hi,

you just use it in any expression with the syntax you already found in the documentation. The only requirement is that the solution you are referencing must already exist.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi, you just use it in any expression with the syntax you already found in the documentation. The only requirement is that the solution you are referencing must already exist. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 22 avr. 2021, 14:27 UTC−4

Hi Edgar,

Thank you for your reply.

Yes, I do I understand this. But I want to take the solution from my Frequency dependent solution and have it as an initial condition in my second time dependent solution. I tried to define it as withsol('sol1',expr) in the initial values of variables solved for under my time dependent study but I can't define an expression there. I have attached my file as well.

Thank you, Alkistis

Hi Edgar, Thank you for your reply. Yes, I do I understand this. But I want to take the solution from my Frequency dependent solution and have it as an initial condition in my second time dependent solution. I tried to define it as withsol('sol1',expr) in the initial values of variables solved for under my time dependent study but I can't define an expression there. I have attached my file as well. Thank you, Alkistis


Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 22 avr. 2021, 16:57 UTC−4

Alkistis,

yes withsol() can't be used there. To use a solution as initial condition you just choose the respective solution from the list that you see. I have never tried it, but I think a frequency domain solution can't be used as initial condition for a time dependent study. There is no time in the frequency domain. The model oscillates at the study frequency in a dynamic steady state. What do you want to achieve with this approach? The Example.prefs file is useless btw.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Alkistis, yes withsol() can't be used there. To use a solution as initial condition you just choose the respective solution from the list that you see. I have never tried it, but I think a frequency domain solution can't be used as initial condition for a time dependent study. There is no time in the frequency domain. The model oscillates at the study frequency in a dynamic steady state. What do you want to achieve with this approach? The Example.prefs file is useless btw. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 24 avr. 2021, 16:12 UTC−4

Hi Edgar,

Thank you for your reply and interest.

I solved the issue. I wanted to combine a frequency dependent study solving for the acoustic pressure with a two time dependent studies. The first one was solving for the laminar flow and the second one for the particle tracing module. I chained them using the "Variables not solved for" in the solvers. However, the "withsol()" operator was required in the acoustic radiation force section which is the force exerted by the acoustic pressure field (standing waves) on the particles. (Might be useful for anyone interested about particle trapping/standing waves applications)

Hi Edgar, Thank you for your reply and interest. I solved the issue. I wanted to combine a frequency dependent study solving for the acoustic pressure with a two time dependent studies. The first one was solving for the laminar flow and the second one for the particle tracing module. I chained them using the "Variables not solved for" in the solvers. However, the "withsol()" operator was required in the acoustic radiation force section which is the force exerted by the acoustic pressure field (standing waves) on the particles. (Might be useful for anyone interested about particle trapping/standing waves applications)

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.