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.

Offset in an Interpolation Function

Please login with a confirmed email address before reporting spam

Hello everyone!

Thanks in advance for your help. I´m a beginner in COMSOL and I´m trying to do some transient simulations with laser-irradiated surfaces. What brings me here is: The geometry of the laser spots I´m using is in a csv file, where there are X and Y coordinates and an energy density Z in the third field. This spots I´m building are the result of scanning a single gaussian spot in different geometries (for example, a square or a flower-like figure), so I´m not able to express them in an analytical function (that´s why i generate the csv file outside COMSOL). Right now, the csv data is already imported into COMSOL within an interpolation function (let´s call it 'energDens').

Now, what I need to do is to be able to move this function 'energDens' in the X direction, so the irradiated surface gets this laser energy in a trajectory. For that matters I need to add a time dependent value to the X variable in 'energDens' function to be able to move the spot over the surface I´m studying. Right now I haven´t been able to access the X and Y coordinates of 'energDens' from other functions to be able to add an offset value and leave Y and Z unchanged.

My thoughts are that my options might be: 1. Define some kind of moving reference frame for the interpolation function. 2. To be able to add an Offset to 'energDens'. 3. Create an additional function (analytical, maybe?) that calls 'energDens' and changes only its X coordinate with each timestep. 4. Move the whole laser-irradiated surface underneath the fixed laser spot (I think this might be the most inefficient of the 4, but it´s worth to mention).

The thing is, I haven´t been able to find the most reasonable path to do any of the latter, mainly because I´m still getting familiar with the software... Do you guys have any ideas of how I could do this?

Thanks again!!

1 Reply Last Post 11 oct. 2016, 08:21 UTC−4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 11 oct. 2016, 08:21 UTC−4
Hello Jose,
Instead of calling enerDens(x,y), you can call enerDens(x-c*t,y) where c is the velocity with which you want it to move in the x direction. t is time.
Best,
Jeff
Hello Jose, Instead of calling enerDens(x,y), you can call enerDens(x-c*t,y) where c is the velocity with which you want it to move in the x direction. t is time. 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.