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.

How to integrate a csv or txt file?

Please login with a confirmed email address before reporting spam

Hello,

I want to use the NREL solar spectrum (https://www.nrel.gov/grid/solar-resource/spectra.html) data in my COMSOL simulations. I am able to import the data into an interpolation table (name is root.int1), however I am not sure how to integrate it. I have tried to do:

integrate(int1,x,lower, upper)

however COMSOL cannot recognize int1 as the interpolation name. Any suggestions would be much appreciate.



1 Reply Last Post Mar 31, 2022, 8:43 a.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Mar 31, 2022, 8:43 a.m. EDT
Updated: 2 years ago Mar 31, 2022, 8:44 a.m. EDT

Hello Gabriel,

If int1 is a function, you call it with the argument x by typing int1(x), not int1.

Best,

Jeff

-------------------
Jeff Hiller
Hello Gabriel, If int1 is a function, you call it with the argument x by typing int1(x), not int1. Best, Jeff

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.