# FDTD custom object issue

I am trying to simulate a logarithmic taper so I have provided the custom object structure two log functions (natural log not base 10), one for the top curve and one for the bottom. The idea is for it to start at x=0 with the bottom curve at y=0 and the top curve at y=0.065 um. At x=65um the bottom curve should be at y=0.065um and the top curve at y=0.257um.

The simulated taper is not being generated as I expect based off the provided equations. It does not start at x=0 which make me think there is a negative issue in the log. However when I plot my functions in Matlab, they behave as expected. I must have some misconception on how this “custom” object needs to be defined.

I have attached the FDTD simulation showing my issue as well as a Matlab plot demonstrating what I am trying to achieve. The blue lines are the linear baseline i.e what the original taper was. and the red line is the desired logarithmic variation.

I am using Lumerical 2021.

Thanks for any help you can provide

## Answers

44Hello @A_Tofini ,

Ansys staff are not able to download files from the ALF, can you please provide some screenshots of the object and the object's geometry properties?

Note that the origin of the coordinate system used by the equations is the center of the custom object, not the global simulation coordinate system. This page has more information:

Which coordinate system are you using?

2Eqn1: 0.1000000000000000*log(11.20587979679935+x)-0.1766438622403369

Eqn2: 0.1000000000000000*log(70.99628759321385+x)-0.4262627588254757

Hopefully this will be enough to substitute for the file you cant open.

@kjohnson

44Hello @A_Tofini ,

It looks like you included the image files as attachments, which unfortunately I can't download either. Can you please place them directly in the post? As in, copy and past them directly into the post, rather than as attachments.

3@kjohnson I had to make a new account because ANSYS kept asking me to confirm my email (again) but would not send a confirmation email no matter how many times I tried.

So I will now attach the image directly like you requested.

44Hello @AlexTof ,

You need to increase the y span of the object, it needs to large enough to contain the shape of the object. Also, the center of your object is at (32.5, 0), not (0,0), so the coordinates used by the equation are different than the global coordinate system. You will need to account for this in your equations.

3Seems like the center of the object was the issue causing the length to be cut off. But the height of the taper end still does not match the equation I have.

What should yspan be equal to? I set it to the height displacement across the taper i.e max height - min height but apparently that's incorrect?

@kjohnson

44The y span of the geometry is set by the equation, however the y span of the Custom object itself sets an upper limit for the y span of the geometry. If the y value of the equatin is greater than the y span of the Custom object the equation curve will be cut off. For example:

In your case you can set the y span to be a large value. As long as it is larger than the maximum y span of the taper it should work.

3@kjohnson I set the yspan to a large enough value for sure at this point but the equation still doenst produce the curve i expect it to. I am now taking into account the center of the object in the equation so i derived the expression based off the minimum and max x so that at min x it should be at y1 and at max x it should be at y2 (higher than y1).

However the produced curve looks nothing like what I get when I plot the exact same expression in matlab.

This is very important that I get this working. Does ANSYS offer a more 1-1 solution method where I could directly speak to someone over the phone or zoom potentially to sort this out?

-Alex

44Hello @AlexTof ,

Please see my reply on the KX here: https://kx.lumerical.com/t/custom-object-issue/82349