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.

Kinetic Energy in CFD

Please login with a confirmed email address before reporting spam

Doesnt look like COMSOL outputs kinetic energy automatically. I've had to postprocess the results to get KE. Specifically, I do a volume integration of rho v^2 over all my stored timesteps in Derived Values - Volume integration. This takes a long time! Does anyone have a faster way to get kinetic energy from a transient CFD calculation?


1 Reply Last Post 14 ago 2021, 06:10 GMT-4
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 14 ago 2021, 06:10 GMT-4

David,

yes complex post processing in Comsol can be painstakingly slow. One workaround I sometimes use is doing the integration using an intop() operation during solving. I define a respective variable and I define a state variable pointing to this variable.

In my experience such integrations during solving do not noticeably increase the solution time. I assume during solving this runs in optimized C code while the post processing is based on slow interpreted Java code.

Using the state variable is key because only this way this variable becomes a part of the solution. Otherwise, if using the normal variable, the integration will be done in Java again. You don't need to run the solver again, update solution is sufficient after you defined it all.

State variables don't have a unit, you need to take care of that by yourself.

Hope it helps, cheers,

Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
David, yes complex post processing in Comsol can be painstakingly slow. One workaround I sometimes use is doing the integration using an intop() operation during solving. I define a respective variable and I define a state variable pointing to this variable. In my experience such integrations during solving do not noticeably increase the solution time. I assume during solving this runs in optimized C code while the post processing is based on slow interpreted Java code. Using the state variable is key because only this way this variable becomes a part of the solution. Otherwise, if using the normal variable, the integration will be done in Java again. You don't need to run the solver again, update solution is sufficient after you defined it all. State variables don't have a unit, you need to take care of that by yourself. Hope it helps, cheers, Edgar

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.