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.
sign of square of a parameter
Posted 27 juil. 2018, 03:14 UTC−4 Electromagnetics, Semiconductor Devices, Wave Optics Version 5.3a 7 Replies
Please login with a confirmed email address before reporting spam
Hello my freinds, (^2) can change negetive sign to positive but why we should use ”abs” before for example; abs(ewfd.s11)^2 to calculate norm of S11?
Please login with a confirmed email address before reporting spam
Hi Amir,
Is ewfd.s11 a vector?
Please login with a confirmed email address before reporting spam
Dear Nichal, ewfd.S11 is scalar matrix. it can be real ,complex, positive or negetive but here, this matrix is real and mixed of positive and negetive numbers. I dont know why (ewfd.S11)^2 has negetive number ?
Attachments:
Please login with a confirmed email address before reporting spam
If it is a scalar matrix with positive and negative numbers then it depends on how COMSOL does the evaluation.
Let me give you an example:
A = [1, -1; -2, 3];
you might be thinking that COMSOL does something like:
A^2 = [(1^2) ,(-1)^2; (-2)^2, 3^2];
that would give all positive values. But what COMSOL might be doing is something like (that is how you might have done it in algebra classes):
A*A = [1, -1; -2 ,3] * [1, -1; -2, 3];
That would give
A*A = [3, -4; -8, 11]
When you use abs() you are despising the signs. My suggestion is to use a simple 2*2 matrix and do some tests in COMSOL that you can also do by hand, just to be sure how COMSOL does this calculation
Please login with a confirmed email address before reporting spam
Thank you for your quick reply. S11 is a matrix that have 2 column and many rows(for example 100) and S11(:,1)(means whole of rows and column1) are same (assume they are frequency) for all calculation. so, How we can use matrix multiply if we have S11 with one column that can be changed.
Please login with a confirmed email address before reporting spam
I think for COMSOL it does not matter if the first column has the same value and the second has different values. When it sees a matrix it must the algebric matrix product. Imagine you have just a simple matrix with equal elements on the first column:
[1 -3; 1; 2]. If you do the math you can check that this product will give negative numbers in the second column. If you just want to do the calculation using the second column I suppose you can try to store just this column as a variable or you can specify the column that you want during results post-processing.
I have never worked with matrix in COMSOL so I do not know more than this, sorry
Please login with a confirmed email address before reporting spam
Thank you dear Nichal
Please login with a confirmed email address before reporting spam
I guess there is some confusion about the S-Matrix. The dimensions of the S-Matrix depends on the number of ports the system has. S11 is one scalar element of the S-Matrix characterizing reflections from port 1. It is in general a complex number and that is why S11^2 can be negative.
Cheers Edgar
-------------------Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
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.
Suggested Content
- FORUM conditional parameter
- FORUM How to model a square wave transient current in AC/DC module
- BLOG How to Use the New Spatial FFT Feature for Applications in Optics
- KNOWLEDGE BASE How to administrate a COMSOL Multiphysics Floating Network License and a COMSOL Server License on the same license server
- BLOG Computing the Band Gap in Superlattices with the Schrödinger Equation