Page 1 of 2

NCELLS

Posted: Mon 6 Sep 2021 06:23
by wtam
Dear Didier,

Can "NCELLS" be defined with arbitrary lengths between cells or gaps? I am looking to have an element that represents:
DRIFT
GAP
DRIFT
GAP
DRIFT
The GAPs will share the same voltage and phase.

Thanks,
Wai-Ming

Re: NCELLS

Posted: Mon 6 Sep 2021 08:55
by Didier
Dear Wai-Ming,

Not really, that's not the spirit of the NCELLS element at all, you should use a simple DRIFT & GAP elements suite.

Regards,

Didier

Re: NCELLS

Posted: Mon 6 Sep 2021 19:35
by wtam
Dear Didier,

This actually ties back to the question I have in my other post. If I use DRIFT & GAP elements suite, is there a way to perform "single" matching on a parameter shared by two GAPs. E.g.

DRIFT 20 20
GAP V1 20 20 0
DRIFT 20 20
GAP V1 20 20 0
DRIFT 20 20

I am sorry if I have repeated my question already in my other post. I thought NCELLS could be a workaround.

Best regards,
Wai-Ming

Re: NCELLS

Posted: Tue 7 Sep 2021 10:02
by Didier
Dear wtam,

Using VARAIBLE command, you can set 'v1' to an unique and common value.
Or Using ADJUST you can link two element parameters to each over

Regards,

Didier

Re: NCELLS

Posted: Wed 8 Sep 2021 23:32
by wtam
Dear Didier,

I understand that I can link two element parameters when using ADJUST. Can we take a step further to link two element parameters with an arithmetic relation. For example, an adjusted value in one element and twice that for another element.

Best regards,
Wai-Ming

Re: NCELLS

Posted: Thu 9 Sep 2021 14:06
by Didier
Dear Wai-Ming,

No, link two element parameters with an arithmetic relation with ADJUST command is not possible
But in some cases, tricks are possible.

The following sequence will therefore not work
VARIABLE v1 1000
ADJUST 1 1 1
GAP V1 20 20 0
DRIFT 10 100
ADJUST 1 1 1
GAP 2*V1 20 20 0

This one will be able to operate
VARIABLE v1 1000
ADJUST 1 1 1
GAP V1 20 20 0
DRIFT 10 100
ADJUST 1 1 1
GAP V1 20 20 0
ADJUST 1 1 1
GAP V1 20 20 0

Regards,

Didier

Re: NCELLS

Posted: Fri 17 Sep 2021 19:56
by wtam
Dear Didier,

Thank you for the trick. Could you think of a trick that can do:

VARIABLE v1 1000
ADJUST 1 1 1
GAP V1 20 20 0
DRIFT 10 100
ADJUST 1 1 1
GAP -V1 0 20 3

For the last gap I am using Type 3 for phase in order to tie it to the previous gap, the drift and speed. So I cannot simply add 180 degrees to the phase.

Best regards,
Wai-Ming

Re: NCELLS

Posted: Mon 20 Sep 2021 15:24
by Didier
Dear Wai-Ming,

The right trick for your example would be like following:

VARIABLE vv1 1000
ADJUST 1 1 1
GAP vv1 20 20 0
DRIFT 10 100
ADJUST 1 1 -1
GAP vv1 0 20 0

Regards,

Didier

Re: NCELLS

Posted: Tue 21 Sep 2021 22:47
by wtam
Dear Didier,

Thank you.
Is there a similar trick for MATCH_FAM_FIELD?

Thanks,
Wai-Ming

Re: NCELLS

Posted: Wed 22 Sep 2021 08:49
by Didier
Dear Wai-Ming,

I would like to make a small correction. To be perfectly exact, this is not exactly a trick but a ADJUST's feature clearly described in the manual.
No the MATCH_FAM_FIELD command doesn't do the same thing.

Regards,

Didier