40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  COMSOL elog, Page 2 of 3  Not logged in ELOG logo
ID Date Author Type Categoryup Subject
  17   Tue Jun 11 10:21:05 2013 Deep ChatterjeeGeneralGeneralRe: Disscussion of the code of a 'comsol with matlab' model file

Quote:

In this post the matlab code to build a model using COMSOL with matlab is analyzed from Koji Arai's codes on the calculation of TR noise in the 1D axisymmetric case. The post primarily describes the various commands used to interface with COMSOL.

It should be noted that the matlab script analyzed here is not the master script that will perform the simulation. The "main" file is called the "Main_thermo_refracive.m" found in the SVN repository TR noise_comsol

>The main script defines a structure called 'param' which stores all the parameters including the material properties and those related to running the simulation in comsol. This structure 'param' is hence passed on as arguments to all the other functions (in the SVN rep)

that compute the analytical solution or the COMSOL simulations.

>The part of the code ( the second if...end block) in "Main_thermo_refracive.m" that calls the COMSOL simulations, calls the function "thermo_refractive_COMSOL_1D_axisymmetric".

>In this function, the parameters are extracted from the structure 'param' and stored in separate variables. The time step in the simulation, the end time, mirror radius are defined and the function

that generates the model "thermo_refractive_COMSOL_1D_axisymmetric_model" is called which prepares the model in COMSOL.

> it should be noted that it is much of much ease to the user to define a simple model in COMSOL and export it in Matlab and then analyzed the same.

I had created a simple such file which a simple 3D metal bar is created and added some physics and study to see how the matlab file.

I have attached the same which also describes the relevant packages and subroutines in the comments. However, I had not erased the COMSOL history before the export hence it has significant amount of superfluous code. One may however have a look at the  same

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>The first thing done by the model builiding function is that it extracts a few parameters and stores them in separate variables in the first lines

f_mod = param.COMSOL.simulation_modulation_freq;
dt    = param.COMSOL.simulation_time_step;
t_end = param.COMSOL.simulation_end_time;

 

>Since COMSOL accepts string arguments, the time steps are defined as a string

trange = ['range(0,' num2str(dt) ',' num2str(t_end) ')'];

**There is however a query regarding the keyword range which in Matlab returns the difference between the maximum and minimum of the list passed to it. range() passed to COMSOL would probably create an array fro 0 - t_end in steps of dt.

The above line converts the quantity 'dt' and 't_end' to a string and concatenates it along with the rest of the string to make a valid string that would be understood by COMSOL.

>The COMSOL class is called next by the following two import statements (after a series of displays on the screen showing the status of the simulation).

>Managing models( like creation and destruction) is handled by the modelUtil class in COMSOL with Matlab and hence to create a model modelUtil.create() is called.  "model.remove()" is used to destroy one such object. Line 29 says -

model = ModelUtil.create('Model');

>The above statement created an object called 'model' in Matlab and and a model in COMSOL by the name of 'Model'. The various attributes of this object is defined by the next few statements. Like,

[line 31] - model.name('thermo_refractive_COMSOL_1D_axisymmetric_model.mph');

The above statement assigns the filename of this COMSOL model created. Note that, since in Matlab, the Matlab object 'model' is used to invoke the functions i.e. 'model.name()' and not 'Model.name()'.

> The 'model.param' contains all functions related to setting and describing the parameters in the model.

*Note that the 'param' following keyword 'model' connected by the '.' has nothing to do with the 'param' structure used in the script "Main_thermo_refracive.m" which have been named anything else

> Now the model.param.set(<P>,<expr>) is used to give the parameter P an expression expr both being string.

The model.param.descr(<P>,<des>) has the same format but gives the description of the parameter P as des (something that is understandable in common terms).

This can be understood in the statements in [line 46 - 51]

model.param.set('beam_shape', '2/(pi*beam_size^2)*exp(-2*r^2/beam_size^2)');
model.param.descr('beam_shape', '');
model.param.set('beam_intensity', 'beam_power*beam_shape');
model.param.descr('beam_intensity', '');
model.param.set('dT', 'mod1.T-T_amb');
model.param.descr('dT', '');

An empty quote in the description implies that no description is given. The above statements define the parameters mentioned alongside them according to Heinerts paper.

>  [line 53-61]. the string 'var1' is used to tag all the global variables that are created. variables are expressions created out of the parameters.

Just like the above case, 'set()' is used to create variables and give them an expression, here as one can see 4 variables are created T_amb, beam_size, beam_power. and f_mod.

model.variable.create('var1');
model.variable('var1').set('T_amb', [num2str(param.material.temperature) '[K]']);
model.variable('var1').descr('T_amb', '');
model.variable('var1').set('beam_size', [num2str(param.beam.radius) '[m]']);
model.variable('var1').descr('beam_size', '');
model.variable('var1').set('beam_power', [num2str(param.COMSOL.beam_power) '[W]']);
model.variable('var1').descr('beam_power', '');
model.variable('var1').set('fmod', num2str(f_mod));
model.variable('var1').descr('fmod', '');

> The next section deals with the geometry. In this case the model is a 1D axisymmetric model. Hence one has the the digit 1 which specifies the dimension and axisymmetric is set to 'true'

model.geom.create('geom1', 1);
model.geom('geom1').axisymmetric(true);

> The run() function is to build the geometry

model.geom('geom1').run;

> The 'Interval' feature is present in the case of 1D models. The following line creates an interval feature called 'i1'

model.geom('geom1').feature.create('i1', 'Interval');

model.geom('geom1').feature('i1').set('p2', num2str(param.mirror.radius));

The above line is used to set the value of the right end-point as the radius of the mirror. The string 'p2' is used to denote the right end point..

So this step creates a cylinder of radius equal to the radius of the mirror. In case of an infinite mirror an extra interval is added from the the radius to twice the radius.

It would help if more description on "interval" is left as comments and on why the extra interval was added and how does it make the calculation different.

> The interval is run using the 'run()' command.

> The material definition is added in the following section. Probably the data seems to have been taken from an external file rather than the COMSOL material library. Details of the file would be of help from the author.

The following lines cannot be understood. Comsol help on"propertyGroup" gives no results found

model.material('mat1').propertyGroup('def').set('heatcapacity', [num2str(param.material.specific_heat_per_volume) '[J/(kg*K)]']);
model.material('mat1').propertyGroup('def').set('density', [num2str(param.material.density) '[kg/m^3]']);
model.material('mat1').propertyGroup('def').set('thermalconductivity', [num2str(param.material.thermal_conductivity) '[W/(m*K)]']);

> The meshing is done on auto.

> As far as the Physics is concerned i.e. what kind of results we expect out of this geometry, the 'HeatTransfer' is selected.

A 1D heat source is created called 'hs1'

model.physics('ht').feature.create('hs1', 'HeatSource', 1);

and the Heat Source is time varying and given by  beam_intensity*sin(2*fmod*pi*t). This can be seen in lines 121-122

model.physics('ht').feature('hs1').selection.set([1]);
model.physics('ht').feature('hs1').set('Q', 1, 'beam_intensity*sin(2*fmod*pi*t)');

> If the mirror is infinite, something called 'InfiniteElements' is applied to the outer interval. More details on "infiniteElements" and why was it used would be helpful.

> A study involving the feature "Transient" was used. However, it is required to know what study was implemented from the GUI since the term "Transient" was not found under Study Steps in the GUI

model.study('std1').feature.create('time', 'Transient');   [line 134]

> The time step tweaking of COMSOL is stopped by the following line 166

model.sol('sol1').feature('t1').set('tstepsbdf', 'strict');

 

 **The point where the feature called 'Transient' is spoken about - By selecting 'Time Dependent' under the 'Study' in COMSOL desktop, the line that gets added to the Matlab script.

So it was the 'Time Dependent' feature that was selected while creating the model

  18   Tue Jun 11 17:04:33 2013 Deep ChatterjeeGeneralGeneralAnalyzing the file 'thermo_refractive_COMSOL_1D_axisymmetric' by Koji Arai

The file 'thermo_refractive_COMSOL_1D_axisymmetric.m' found in the SVN repository https://nodus.ligo.caltech.edu:30889/svn/trunk/comsol/thermo-refractive/ performs the data extraction from the COMSOL simulation

and computes quantities as given in Heinert's paper.

This is the where the dissipation is calculated from the temperature gradient and the use of FDT is made to evaluate the linearized PSD.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The first few lines of the code extracts the variable values out of the structure 'param' and stores it in new variables for the ease of coding.

The important portion comes in with the iterative structure (for loop) in line 29.

A point wise summary of the steps done would be as follows -

* The finite elements in space and time are defined in the arrays r0 and t0 according to the time and radial slice steps dt and dR until R, the radius and the t_end, the time until which simulation runs

* A matrix called dat is created which is used to store the values of the temperature gradient as returned by COMSOL.

It stores the values as a function of r along the columns and as a function of t along the rows.

Thus, moving vertically down the matrix in a column would give the values of the temperature gradient for a fixed r as a function of t

* Two other row vectors datrabs and datrphs having lengths of the array r0 are used to store the values of the square of the Fourier coefficients and the phase angle.

* The extraction of data from COMSOL is done in the lines 71-74

    for i2=1:length(t0)
       tmp = mphinterp(model,'ht.gradTr','coord',r0,'T',t0(i2));
       dat(:,i2) = tmp;
    end

* After the above step, the matrix dat is filled with the values of the temperature gradient as mentioned previously.

* Next to evaluate to the Fourier coefficients, the second half of the simulation time is used. Probably to let the transients die down as mentioned in the ELOG post by the author.

* To find out the Fourier components, we multiply the desired function by sin(omega*t) or cos(omega*t) and integrate over the period of the function. There is also a prefactor of 1/L where L is the length of the period

over which the function is defined.

* To do the above exercise, the sine and cosine of omega*t is separately evaluated and stored in skernel and ckernel. Note that the time interval as mentioned above is the second half of the simulation time.

* Now for all the radial slices, the Fourier coefficients are extracted using the statements in for loop in line 83

    for i2=1:length(r0)
       tseries=detrend(dat(i2,(length(t0)+1)/2:length(t0)));
       tmp1=mean(tseries.*skernel);
       tmp2=mean(tseries.*ckernel);

       datrabs(i2)=2*sqrt(tmp1^2+tmp2^2);
       datrphs(i2)=atan2(tmp2,tmp1)/pi*180;
    end

Using the definition of mean of a function ' f ' in the continuous case as f_mean = integral{ f(t)dt} / integral{ dt } , over the values of t

tmp1 has used ' f ' as tseries.*skernel which means that one multiplies the time signal with sin(omega*t) and integrates. tmp2 has used cosine instead

Thus, tmp1 and tmp2 are the Fourier coefficients of tseries at the frequency fmod defined right close to the first for loop in line 29.

* The coefficients are squared and added in the line 88

       datrabs(i2)=2*sqrt(tmp1^2+tmp2^2);

This quantity how much of the frequency ' fmod' is present in the time signal.

datrphs stores the same for the phase shift phi. Note however, all of this is done as a function of r. The plotting is done in the following lines. Note that while running the code, as a result, the plots are seen to
get updated each time the loop [line 29] iterates.

* Following this, is the part where W_diss, the dissipation is calculated using formula [The expression used does not match Eq. 15 in Heinert's. Any comments regarding the formula used for W_diss are welcome].

The heinert's eq(15) goes as - W_diss = pi*H*kappa/T0 * integral{ grad_T^2 * rdr }

The quantity datrabs is squared and the integral mentioned above is calculated w.r.t. r using the trapz algorithm from Matlab.

The value for each frequency i.e. each 'fmod' is converted to a string and displayed on screen.

* The reason why the grad_T was changed to its frequency domain before integration is suspected to be something related to the Parseval's Theorem. However, more details or correction on the same is welcome.

  19   Wed Jun 12 13:52:44 2013 Deep ChatterjeeOpticsGeneralDifference in COMSOL and Analytic solution for TR noise

In this post, I am reporting of the relative difference between the analytic and COMSOL results.

The file by the name 'Main_thermo_refractive.m' found in the SVN was slightly modified to generate the difference plot.

The quantity plotted is the absolute value of the difference between the two results divided by the result given by COMSOL.

The plot is in a semilogx plot. It can be seen the maximum deviation goes to a maximum of 6%.

Also the difference is higher at the higher frequencies.

The plot shows two cases - the case for which 500 terms in the series were summed to get the analytic solution and second
is the case where 1000  terms were summed. The plot does not change much due to the number of terms being summed
showing that the convergence is fast.

analytic~COMSOL.png

  20   Mon Jun 17 11:06:17 2013 Emory BrownGeneralGeneralPlans for the week of 6-17-13 through 6-22-13

This week I will update my previous eLog entry with a nicely labeled plot showing both lines on the same plot, then I intend to implement improved meshing on the mirror in the COMSOL model I have constructed, increasing the number of elements on the mirror's face and the central axis of the mirror such that there are more elements in the regions where the applied force is greatest.  This should result in more accurate and faster to compute simulations, allowing us to increase the number of elements in the mesh and possibly reduce the residual and allow us to use the better gravitationally balanced boundary condition and obtain an answer which converges.  Afterwords, I intend to look at sample code showing how to use Matlab in conjunction with COMSOL since we will need to do so for my project.  If there is time remaining later in the week, I will attempt to replicate some of the results Steve Penn generated in order to verify my model.

  21   Mon Jun 17 14:59:20 2013 Emory BrownOpticsGeneralImproved Meshing in a COMSOL Model

In order to make computations more efficient and possibly allow the set of boundary conditions based on Liu and Thorne's suggestion of a gravitational force preventing bulk motion of the mirror (described in http://nodus.ligo.caltech.edu:8080/COMSOL/3) we want to be able to more optimally mesh our structures.  In particular, we would like to have a finer mesh on the face of the mirror and especially near the center of the mirror.  Doing so will allow us to significantly reduce the total number of elements contained in the mesh while keeping a large number in the regions which require them.

The best way to improve the meshing that I have found so far is to introduce a new geometry and mesh around it.  In order to test this method, I constructed an additional cylinder in my model centered at the same location as the mirror.  I gave the cylinder the same height as the mirror so that they can be changed by modifying a single variable and set the cylinder's radius equal to the Gaussian beam size of the laser.  I then constructed a user-defined mesh composed of two free tetrahedral operations.  The first of these I restricted to the smaller cylinder.  By selecting a distribution using a fixed number of elements, this region can be meshed fairly uniformly and densely.  The second meshing region can be specified again using the inner cylinder's top face as well as the edges running along its side.  For this region, it seems optimal to use a predefined distribution type and select a geometric sequence.  Using this method provides a much finer mesh in the areas where we want one, without wasting computational power performing more calculations in uninteresting regions.  A screenshot demonstrating the results of this method is shown below.

I ran the previous analysis using the simplest boundary condition of a fixed back using this new mesh.  The newly constructed mesh contained 7038 elements instead of the previous 7243 and obtained a Umax=1.57985*10^-10 J instead of 1.52887*10^-10 J.  This is about a 3% difference in results.  In the next few days, I will run the simulation again on a computer with more RAM using a finer version of the original mesh in order to confirm that the results of the new mesh agree better with it than with the current mesh with a similar number of elements.  As a more immediate test, I constructed a mesh of 1940 elements using the new method and obtained a result of Umax=1.56085*10^-10 J which is closer to the value obtained using the original meshing technique, though far enough away to indicate that they may not agree, which encourages me to run the original mesh design with more elements.

The next thing to consider is further improving the mesh by increasing the element density near the mirror's front face.  From what I have seen it may be more difficult to implement both of these improvements together, in which case we can perform testing to determine which of the two methods provides better computational efficiency.

  22   Tue Jun 18 15:26:50 2013 Emory BrownOpticsGeneralAttempting to Implement Liu and Thorne's Boundary Conditions

Liu and Thorne demonstrated in their paper that the optimal set of boundary conditions for a problem like the one I am working on is the balance the force applied to one of the mirror faces by an opposing force of equal magnitude distributed throughout the body of the mirror.  When we first attempted to implement this boundary condition, we obtained an error from COMSOL indicating that a solution could not be generated as "The relative error is greater than the relative tolerance."  I attempted to find a solution to this problem so that we can run our simulations using the correct boundary conditions.

I tried a number of settings changes and tweaks suggested on the COMSOL forums and in official documentation on the error (https://community.cmc.ca/docs/DOC-1453), but without success.  Most of the suggestions were not relevant to our model, and confusingly when the number of elements in the mesh was increased from 13628 to 24570 the relative residual increased contrary to our initial attempts in http://nodus.ligo.caltech.edu:8080/COMSOL/3.  It seems like the next action to take is to attempt to generate a simpler model and attempt reproduce and fix the same error.

I also decided to run both an eigenfrequency and frequency domain solver on our model using improved meshing with 24570 elements.  I first ran these solvers using the rigid back constraint and both of them returned Umax=1.49931*10^-10 which gives Sx(100 Hz)=1.97673*10^-40 m^2/Hz which agrees quite well with the solution obtained from our previous simulations which gave Sx(100 Hz)=2.0157*10^-40 m^2 / Hz.  This still significantly differs from the analytically obtained value of 7.80081*10^-40 m^2 / Hz using Liu and Thorne's calculation.

I then changed the boundary condition to use Liu and Thorne's gravitational body load boundary condition and both of these methods returned Umax=1.17164*10^-9 J which corresponds to Sx(100 Hz)=1.54472*10^-39 m^2/HZ.  This only differs from the analytic result by a factor of 1.98, which is a significant improvement over the previous simulations, but still a much more significant difference than I would hope for given that they now use the same boundary conditions and it seems unlikely that using a stationary state solver will give a different result when both the eigenfrequency and frequency domain solvers agree to 6 digits.

 
I will spend some time attempting to figure out why the stationary solution is returning the relative residual error.  Afterwords, I will start to learn how to use Matlab in conjunction with COMSOL in order to allow us to vary the mirror's size as we want in a systematic manner.  Also, Yanbei Chen suggested that we may want to add in a mirror coating later in the project and see how its Brownian noise responds to changes in the mirror substrate shape.

 

edit: Taking the advice of the error documentation, I also ran a time dependent solver which returned the same result as the eigenfrequency and frequency domain solvers.

 

  23   Wed Jun 19 14:59:13 2013 Emory BrownGeneralGeneralThe Relative Residual Convergence Error

 We have been encountering an error in COMSOL for a while of the form "Failed to find a solution.; The relative residual (###) is greater than the relative tolerance.; Returned solution is not converged.; -Feature: Stationary Solver 1 (sol1/s1); -Error: Failed to find a solution."  The error has occurred when attempting to find a stationary solution in models with boundary loads and no fixed constraints (preventing an edge from moving).  We wanted to determine what the error was caused by to allow us to use the stationary solver, or at least to confirm that the error was not indicative of a problem in our model.  To this end, I designed a few very simple COMSOL models in which I was able to reproduce the behaviour and attempted to determine the root of the issue.

I first constructed a somewhat similar model to ours using a cylinder of fused silica with all of the default values and a normal meshing.  I applied a boundary load of 1N on one of the faces and ran a stationary solver.  As expected, the solver failed to converge since it had no boundary condition preventing it from accelerating continuously.  Applying a force of 1N on the opposing face resulted in the same error as above, which replicates the previous error since the system is failing to converge in a case where it should.  I decided also to make an even simpler 2-D model of a square.  Applying 1N forces to opposing sides on the square again returned the error above.  

Both of these models were able to be evaluated using at least an eigenfrequency solver as noted on the primary model in the previous eLog.  I looked on the COMSOL forums and read through some more of their documentation and saw the suggestion in response to this error to use a time-dependent solver and simply view times after the system will have settled to a stationary state (#2 https://community.cmc.ca/docs/DOC-1453).  I attempted this on the test models and both of the time dependent solutions converged without error to their expected solutions (compression between the faces on which forces were being applied).  This may be a sub-optimal computational method though as even in the simple cylinder case with 6133 elements and a simple force profile, the solution took several minutes to run.  For the cylindrical model, I evaluated the strain energy  using both an eigenfrequency and time dependent solver and obtained the same result using both of the solvers.  The eigenfrequency solver evaluates much more quickly than the time dependent solver, and in the primary model as I noted in my previous eLog, the strain energy  obtained using the eigenfrequency and frequency domain solvers agreed, so it seems that the best manner in which to proceed is to use the eigenfrequency solver to compute the strain energy.

The source of the error is still unknown, but given these tests, it seems very unlikely to be indicative of a problem in our model.  We still have a very significant disagreement between the simulated results and the calculated values.  I am going to spend the next day or so looking through both the COMSOL model and the analytic calculation and checking them for errors which could cause this discrepancy.  I will then start reading the documentation on Livelink for Matlab and try to implement it.

  24   Thu Jun 20 10:26:38 2013 Matt A.GeneralGeneralThe Relative Residual Convergence Error

Emory:

I don't understand how you're getting the strain energy from the eigenvalue solver. It is my understanding that the eigenvalue solver will only give you the strain energy at a particular eigenfrequency. We're interested in the strain energy from the beam deformation at frequencies below the first eigenmode. 

 

Quote:

 We have been encountering an error in COMSOL for a while of the form "Failed to find a solution.; The relative residual (###) is greater than the relative tolerance.; Returned solution is not converged.; -Feature: Stationary Solver 1 (sol1/s1); -Error: Failed to find a solution."  The error has occurred when attempting to find a stationary solution in models with boundary loads and no fixed constraints (preventing an edge from moving).  We wanted to determine what the error was caused by to allow us to use the stationary solver, or at least to confirm that the error was not indicative of a problem in our model.  To this end, I designed a few very simple COMSOL models in which I was able to reproduce the behaviour and attempted to determine the root of the issue.

I first constructed a somewhat similar model to ours using a cylinder of fused silica with all of the default values and a normal meshing.  I applied a boundary load of 1N on one of the faces and ran a stationary solver.  As expected, the solver failed to converge since it had no boundary condition preventing it from accelerating continuously.  Applying a force of 1N on the opposing face resulted in the same error as above, which replicates the previous error since the system is failing to converge in a case where it should.  I decided also to make an even simpler 2-D model of a square.  Applying 1N forces to opposing sides on the square again returned the error above.  

Both of these models were able to be evaluated using at least an eigenfrequency solver as noted on the primary model in the previous eLog.  I looked on the COMSOL forums and read through some more of their documentation and saw the suggestion in response to this error to use a time-dependent solver and simply view times after the system will have settled to a stationary state (#2 https://community.cmc.ca/docs/DOC-1453).  I attempted this on the test models and both of the time dependent solutions converged without error to their expected solutions (compression between the faces on which forces were being applied).  This may be a sub-optimal computational method though as even in the simple cylinder case with 6133 elements and a simple force profile, the solution took several minutes to run.  For the cylindrical model, I evaluated the strain energy  using both an eigenfrequency and time dependent solver and obtained the same result using both of the solvers.  The eigenfrequency solver evaluates much more quickly than the time dependent solver, and in the primary model as I noted in my previous eLog, the strain energy  obtained using the eigenfrequency and frequency domain solvers agreed, so it seems that the best manner in which to proceed is to use the eigenfrequency solver to compute the strain energy.

The source of the error is still unknown, but given these tests, it seems very unlikely to be indicative of a problem in our model.  We still have a very significant disagreement between the simulated results and the calculated values.  I am going to spend the next day or so looking through both the COMSOL model and the analytic calculation and checking them for errors which could cause this discrepancy.  I will then start reading the documentation on Livelink for Matlab and try to implement it.

 

  25   Thu Jun 20 12:41:01 2013 Deep ChatterjeeGeneralGeneralThe expression for the "work dissipated" in the TE and TR noise calculations

While discussing TE noise with Yanbei Chen, it was realized that the expression for the work dissipated W_diss was derivable from the inhomogenous Heat equation with a source term.
The exercise was tried out to some success and can be found in the attachment. The attachment describes the steps roughly.
The important point to note is the fact that while Liu and Thorne considered stresses developed in the material by means of the heat balance equation, they have ultimately resorted to the
expression for W_diss = 1/T * integral{ kappa * grad(T)^2 rdr } to calculate the dissipation. They have used an expression whch relates the expansion, Theta, to the gradient of temperature.

It is suspected that the fundamental approach is to consider a source of heat and evaluating the dissipation. However, Liu and Thorne considered applying pressure probably because of the
physical scenario of the fluctuations in the mirror face.

Discussion over the same would be helpful.

  26   Thu Jun 20 12:51:44 2013 Emory BrownGeneralGeneralThe Relative Residual Convergence Error

I used the same integrator that we had setup for use with the stationary solver.  I had expected it to either fail or return a very different result, but assumed that the fact that it was returning the same result as when it was used after the previous solvers indicated that it was able to use that solver to find the value.  After seeing this comment I went back and checked and the solver was setup to use the last stationary solution regardless which solver last ran.  I will run the previous tests which relied on using this integrator in conjunction with non-stationary solvers again and see if they actually agree and how the results they give compare to the analytic solution.  I will spend some time today trying this.  Unfortunately, both the time dependent and frequency domain solvers take a long time to converge, so running these tests may take most of the day, but I can start reading through some of the Livelink for Matlab documentation while they run.

 

edit:

I ran the time-dependent solver for the rigid back boundary condition and computed the strain energy for the final two time-steps.  Both of them gave a value of 1.58425*10^-10 J which corresponds to Sx(100 Hz)=2.08871*10^-40 which is about 3.6% greater than the value obtained from the stationary solver.  I don't understand why these values would differ at all.  When I tried to run the time dependent solver with the spring back and gravitationally opposing force boundary conditions an error message was returned: "Failed to find consistent initial values., Last step is not converged.; -Feature: Time-Dependent Solver 1 (sol4/t1).; -Error: Failed to find consistent initial values."

I'm going to spend some more time looking at the COMSOL model attempting to find anything which could be causing this error and reading any relevant documentation I can find.

edit 2:

I spent most of the day attempting to find the source of either of these errors.  Possible solutions I found and tried included increasing or decreasing how fine the mesh is, increasing the acceptable tolerances, and increasing the time interval in the time dependent solver.  I attempted all of these and none of them worked.  Surprisingly, when I increased the acceptable tolerance level for the stationary solver, it returned a greater relative residual which does not make sense to me.

I also took the simple 3d cylinder constructed yesterday and was able to replicate the errors with it.  When I increased the time interval on that case for the time dependent solver, it converged and gave a result.  I was able to get a Umax value for the final time step, which should be equivalent to the one which we would expect a stationary solver to return.  Further increasing the number of time steps the primary model computed did not cause it to converge.  I will run this again with many more time steps and see if it converges.  Even if it does, this doesn't seem like a good way to do our computations as it takes a long time to complete a solution, but seeing whether it converges may give us information on what the problem with the stationary solution is, in particular if increasing the number of time steps does cause it to converge, then that would indicate that finding a way to make the simple case converge would probably work for our model as well.

 

Quote:

Emory:

I don't understand how you're getting the strain energy from the eigenvalue solver. It is my understanding that the eigenvalue solver will only give you the strain energy at a particular eigenfrequency. We're interested in the strain energy from the beam deformation at frequencies below the first eigenmode. 

 

Quote:

 We have been encountering an error in COMSOL for a while of the form "Failed to find a solution.; The relative residual (###) is greater than the relative tolerance.; Returned solution is not converged.; -Feature: Stationary Solver 1 (sol1/s1); -Error: Failed to find a solution."  The error has occurred when attempting to find a stationary solution in models with boundary loads and no fixed constraints (preventing an edge from moving).  We wanted to determine what the error was caused by to allow us to use the stationary solver, or at least to confirm that the error was not indicative of a problem in our model.  To this end, I designed a few very simple COMSOL models in which I was able to reproduce the behaviour and attempted to determine the root of the issue.

I first constructed a somewhat similar model to ours using a cylinder of fused silica with all of the default values and a normal meshing.  I applied a boundary load of 1N on one of the faces and ran a stationary solver.  As expected, the solver failed to converge since it had no boundary condition preventing it from accelerating continuously.  Applying a force of 1N on the opposing face resulted in the same error as above, which replicates the previous error since the system is failing to converge in a case where it should.  I decided also to make an even simpler 2-D model of a square.  Applying 1N forces to opposing sides on the square again returned the error above.  

Both of these models were able to be evaluated using at least an eigenfrequency solver as noted on the primary model in the previous eLog.  I looked on the COMSOL forums and read through some more of their documentation and saw the suggestion in response to this error to use a time-dependent solver and simply view times after the system will have settled to a stationary state (#2 https://community.cmc.ca/docs/DOC-1453).  I attempted this on the test models and both of the time dependent solutions converged without error to their expected solutions (compression between the faces on which forces were being applied).  This may be a sub-optimal computational method though as even in the simple cylinder case with 6133 elements and a simple force profile, the solution took several minutes to run.  For the cylindrical model, I evaluated the strain energy  using both an eigenfrequency and time dependent solver and obtained the same result using both of the solvers.  The eigenfrequency solver evaluates much more quickly than the time dependent solver, and in the primary model as I noted in my previous eLog, the strain energy  obtained using the eigenfrequency and frequency domain solvers agreed, so it seems that the best manner in which to proceed is to use the eigenfrequency solver to compute the strain energy.

The source of the error is still unknown, but given these tests, it seems very unlikely to be indicative of a problem in our model.  We still have a very significant disagreement between the simulated results and the calculated values.  I am going to spend the next day or so looking through both the COMSOL model and the analytic calculation and checking them for errors which could cause this discrepancy.  I will then start reading the documentation on Livelink for Matlab and try to implement it.

 

 

  27   Thu Jun 20 16:29:38 2013 Deep ChatterjeeOpticsGeneralDifferences on using a coarser mesh in calculating TR noise

In the code for evaluating TR noise, the parameter for automatic meshing (which can take values from 1 to 9 -  1 being the finest and 9 the coarsest mesh) was changed from 1 to 5 and 9.
The computation time surprisingly doesn't differ much. The maximum relative error also stays close to 6% as in the case of the finest mesh. The relative difference for two cases for a mesh
number of 5 and 9 are shown in the attachment.

The conclusion being that it is better to stick to the mesh number 1 which is the finest mesh.

difference_in_mesh.png

 

  28   Sun Jun 23 14:00:05 2013 Emory BrownGeneralGeneralManipulating the Relative Tolerance

  We have been seeing an error when attempting to use a stationary solver in conjunction with a set of boundary conditions which does not fix the face of the mirror opposite the applied force.  I have tried a number of settings changes and tweaks in order to attempt to get the stationary solver to converge on our model.  I have found that by switching to the PARDISO solver and increasing the relative tolerance to 500, the solution will converge (Umax=1.49866*10^-10 J).  This does require increasing the relative tolerance greatly, which is concerning.  After doing this, I also found that by increasing the relative tolerance to 700 and using the SPOOLES solver it also converged giving Umax=1.498653*10^-10 J.  The fact that these agree quite well indicates that the increase in relative tolerance may not have harmed our values.  If this were a more complicated system which we would expect to have behaviour which could cause our solvers to get stuck on a set of values I would be more concerned, but I think that this may be a workable fix in this case.  These values of Umax give Sx(100 Hz)=1.97586*10^-40 m^2/Hz which differs by about 5% from our previous value of Sx(100 Hz)=2.08291*10^-40 m^2/Hz.  Unfortunately, this seems to indicate that the difference in results between the COMSOL model and our direct computation is not due to a difference in boundary conditions.  I will spend some time looking for more useful documentation on the relative residual, relative tolerance, and LU factorization: out of memory (despite having more RAM availiable) error, then I will work through our COMSOL model again, possibly remaking it, and check it for any errors which could result in the disparity between our simulated and directly computed results.

 
After doing this, I was able to find more information on the relative tolerance in the COMSOL release.book (page ~30 https://www.tuegrid-doc.uni-tuebingen.de/dokuwiki/lib/exe/fetch.php?id=hpc-uni%3Asoftware-docs%3Acomsol%3Acomsol&cache=cache&media=hpc-uni:software-docs:comsol:release.pdf).  It appears that the relative tolerance and the Factor in error estimate values jointly determine the maximum allowed difference between successive estimates when using an iterative solver.  I decided to try to get a better idea for this behaviour, so I increased the Relative tolerance to 10000 and surprisingly obtained the same result as before.  I think I am going to recreate our COMSOL model without any unnessesary things implemented and only include a stationary solver, then run this test again as it seems like this should have had some affect on the output.
  29   Sun Jun 23 14:29:04 2013 KojiOpticsGeneralDifferences on using a coarser mesh in calculating TR noise

What about the dependence on the size of the time slice?

It is unclear what the unit fo the frequency. Hz? ot logHz (which should be expressed as 10^1, 10^2, ...)?

Can you combine the result of the caluculation and the error together?
i.e. Combine the plot similar to http://nodus.ligo.caltech.edu:8080/COMSOL/4 and your plot with the horizontal axies lined up.

  30   Mon Jun 24 16:02:43 2013 Emory BrownOpticsGeneralRebuilding a minimal version of our COMSOL model

 I rebuilt our COMSOL model in order to see if I could find any errors in it and to clean out unnessesary features and parameters.  The model returned the same results as before, and I did not find anything wrong with it while rebuilding it.  Running an Eigenfrequency solver gives the first real mode as a sheer mode, indicating that a normal meshing may be insufficient, but finer meshes result in an out of memory during LU factorization error despite having just rebooted the computer used and having several gigs of unused RAM.  I have also submitted a ticket to COMSOL support asking for assistance with the relative residual error, but the initial response I recieved was unhelpful.  Hopefully I get a more helpful response soon.  I have started working through a LiveLink for Matlab tutorial (http://www.rz.uni-karlsruhe.de/~hf118/tutorial_comsol_matlab_livelink.pdf) I found from a third party and reading example Matlab code, since I am not familiar with Matlab.  I will continue reading through this documentation for the next day or so, then hopefully will recieve useful help from the COMSOL support team.  If so, I can start working on using Matlab Livelink to parameterize our model and vary the radius of the back face of the mirror to replicate Steve Penn's results.  Otherwise, I may try doing so with the increase of relative tolerance which caused the stationary solution to converge last week.

  31   Mon Jun 24 18:00:26 2013 Deep ChatterjeeOpticsGeneralThe problem of TE Noise calculation for a beam passing through a cylindrical substrate

In this post, I mention of my immediate plan for the week and also describe the problem I am looking at in brief.

In the calculation of TR noise for the beam passing through a cylindrical substrate, Heinert has considered thermal fluctuations
by means of an sinusoidally oscillating heat source, scaled according to the intensity profile of the beam, present along the length of the cylinder.
The heat equation is then solved to evaluate the temperature field. The gradient of temperature is used to calculate the work dissipated.
The work dissipated then is used to find the spectral density according to the Fluctuation Dissipation Theorem.

On the other had, the case of TE noise is considered in the work by Liu and Thorne where the beam reflecting from one of the faces is
considered. In their work, they have used an oscillating pressure, scaled according to the beam, at the face. The equation of stress balance
is solved to get the strain field, the strain results in heating and as a result, a temperature gradient. The work dissipated is calculated using
the gradient of temperature and the spectral density is calculated using the FDT.

Now, in case of Heinert's work, it is to be noted that the heating term is the one that contains the TR coefficient, beta = dn/dT. This is the where
the TR noise that we are looking into comes in the picture. Liu and Thorne's work on the other had, never has an explicit heat source. In their case,
it is the strain that generates the heat implicitly. They have related the expansion with the temperature perturbation in their paper from an expression
in Landau Lifshitz's, Theory of Elasticity. The important point to note is that the physical parameters that characterize the TE noise like coefficient of
linear expansion, alpha, or Poisson ratio, sigma, come into the picture through this relation. Another point to note is that the expression
for the work dissipated ( W_diss ) uses the gradient of temperature( It is the same formula that Heinert has used). This expression is derivable from the heat
equation. Thus, one could have also done the exercise by injecting the right heat source and solving the heat equation instead, since its ultimately
fluctuations in temperature that cause these noises TR or TE.

Our problem is to evaluate TE noise for a beam that passes through the cylindrical substrate instead of reflection off the face. It is suspected that using an
oscillating pressure on the surface will not be the correct approach since the beam is going through the material and not just reflecting from the surface. We
want to solve it by means of a heat injection, as done in Heinert, calculating the gradient of temperature, the work dissipated and then the spectral density. It is realized that the
heat source should be oscillating but the correct coefficients is what is undetermined i.e. we realize the heat source is q_dot = [- - -] * cos(omega * t) . In case
of Heinert it is at this point that the 'beta' comes in. However, in the TE case this is not yet determined. The literature doesn't deal with the case of beam goin through
a material. The equations in Heinert must be looked at more deeply to realize how the 'beta' comes in and then drawing an analogy, we may be able to figure out the
right heat source for the TE noise case.

Any comments on references,  the approach that should be taken, or any thoughts on the problem is most welcome.

  32   Tue Jun 25 15:16:59 2013 Arnaldo RodriguezOpticsGeneralSetting Up Looped Simulation for PID Controller

After setting up a COMSOL model that includes the heat flux from the laser and the ring heater, I've made the model solve over time manually by performing the solution process over a loop in MATLAB.

This allows for the future insertion of the PID controller object in the solving process, and the dynamic manipulation of the applied heat loads.

The following is an automatically generated plot of defocus effects as a function of time at 1 beam radius (54 mm), included in the program, with only the ring heater turned on in a top-hat emission configuration and the total power being 5 watts.

The linear projection values needed to calculate the defocus effect are extracted directly from COMSOL, with no output files required through the use of the mphinterp command.

The behavior appears to be physical and is of the correct order of magnitude.

Defocus.png

I've also attached the code that produced it for verification. (It requires COMSOL+Matlab to run.)

 

  33   Tue Jun 25 15:18:41 2013 Emory BrownOpticsGeneralA new boundary condition to attempt to avoid the relative residual error

 I contacted COMSOL support about our difficulties with the relative residual error and was told "Typically for solid mechanics this error is because you have not constrained the body enough. So any solution + a rigid body transformation is also a solution. To remove this non-uniqueness, you need a solutions modulo the rigid body transformations. So try and constrain the body somehow."  This is what the gravitationally balanced body load was supposed to do, but using the stationary solver has been non-convergent and the eigenfrequency solver has generated odd modes, with the first real modes being sheer modes.  These outputs indicate a problem with our model.  Matt noticed yesterday that the meshing in our model was slightly non-symmetrical, but we initially dismissed it as not being significant since it was a minor difference which we did not think could account for the large errors we are facing.  At further consideration though, if some asymmetry arising from any source, even a numerical or rounding error, were present, that could cause a slight rotation of the object which would cause the object to experience a torque and minor sheer force.  The stationary solution would not converge in this case, but the eigenfrequecy solution might, and if it did it would make sense to see sheer modes for some of its low frequency eigenmodes, as we have.  One possible solution to this problem is to change the way we mesh the material to ensure a symmetrical distribution of nodes in the x-y plane, probably by extruding lower dimensional meshed systems into our model.  I am unsure if we would be able to implement this solution once we start to change the size of the radii of the object's faces.  An alternate solution is to find another set of boundary conditions which should be equivalent to the gravitational body load constraint, but which are stable relative to minor perturbations of the system's conditions.  I think that I have found another set of boundary conditions which should work and not be too difficult to implement in COMSOL.

The sides of the object should not move in the direction orthogonal both to their displacement from the center of the circular plane of the object even with them in the z direction or in the z direction, so the edge displaced from the center in the y direction should be fixed in the x direction.
The object's center of mass should not move which because of the previous condition can be reduced to not moving in the z direction.
I think that these boundary conditions should either be compatible with, or replace Liu and Thorne's boundary conditions in our model.  I am going to spend some time attempting to implement these boundary conditions, see if they converge, and see if adding Liu and Thorne's gravitationally balanced force with them makes any difference, either in results (which it shouldn't) or the amount of time required to run.  I am not sure how long this will take to implement, but I don't expect it to take more than a day or two.
  34   Wed Jun 26 13:52:06 2013 Arnaldo RodriguezOpticsGeneralVerifying Relative Error in Defocus for Regular and Manual-Loop Simulations

To verify the validity of the solutions produced by the manual simulation, I've calculated the relative error between the results from the manual code and the results produced by COMSOL normally.

The plot for the relative error in the defocus at r = 0 and r = 54 mm is shown below, in the case where only the ring heater is turned on at a total power of 5 W.

Defocus_Error.png

The following indicates that the maximum error is less than 0.01% (in percent error format).

 

 

 

 

 

  35   Wed Jun 26 15:23:55 2013 Arnaldo RodriguezOpticsGeneralSolving Time per Loop in Manual Dynamic Simulation

I've attempted to determine the solving time per loop as a function of the simulation time, in an attempt to identify any trends in the solving time for a constantly dynamic load.

The following is a plot of the solving time per loop as a function of the simulation time for a load which is constantly dynamic (sinusoidal in time, in this particular run).

The mesh size is normal (default in COMSOL) with heat fluxes from both the beam and the ring heater (as in the real case).

 SolvingTimePerLoop.png

It is difficult to identify any particular behavior or trend due to the large amount of "noise" other than a trivial general increase after ~4 s. Mesh quality does not appear to influence solving time per loop significantly.

Work must be done to reduce the total solving time for the simulation, which in this case amounted to 18 and a half minutes (1.1109e+03 seconds).

 

  36   Wed Jun 26 16:46:32 2013 Emory BrownOpticsGeneralA convergent stationary solution

 By adding additional constraints as described in the previous eLog to the model I was able to get a convergent solution using the stationary solver.  I cleared meshes, solutions, and history and uploaded the file in its current form.  Using the stationary solver, we get Umax=1.51646*10^-10 J instead of the 1.52887*10^-10 J obtained using the rigid back constraint.  This is less than a 1% difference, so it is still off from the analytic solution by a factor of ~4.  I will look through the model and analytic calculations again and see if I can find anything which could contribute more than a few percent difference.

  37   Thu Jun 27 11:26:18 2013 Emory BrownOpticsGeneralMissing factor of 4 and a comparison of analytic and simulated Brownian noise

 In our calculation of Sx(f) from Umax prior to this, we were missing a factor of 4.  The correct formula from Liu and Thorne's formula 58 is Sx[f] := 4*Kb*T*Umax*Phi/Pi*f*F0^2).  When we correct this formula, we get results which agree fairly well with the analytic results.  The Mathematica script attached was used to perform both calculations of the thermal noise spectrum (using SxComsol and SxFTMThorne).

SxCOMSOL(100 Hz) = 7.99735*10^-40 m^2/Hz

SxFTMThorne(100 Hz) = 7.80081*10^-40 m^2/Hz

These results differ by about 2.5%.  We also need to verify that the result converges for increasing mesh size.

 

Number of Elements

Umax (*10^-10 J)

1224

1.48859

7011 (used above)

1.51589

13306

1.51891

 

I attempted to run the simulation with 24360 elements in the mesh, but the computer I was running it on repeatedly crashed.

edit: Running on a more powerful computer I got the following additional values.

 

Number of Elements

Umax (*10^-10 J)

1224

1.48859

7011 (used above)

1.51589

13306

1.51891

24181

1.52169

61772

1.52281

 

 Given these additional values, it appears that our simulation will converge to a value for increasing mesh size and that it agrees fairly well with the analytic result.

  38   Thu Jun 27 15:06:13 2013 Arnaldo RodriguezOpticsGeneralPID Function in Manual Simulation

 I have inserted a rudimentary PID function into the manual simulation code as a way to test whether or not the PID function is changing the defocus values in the desired manner.

I am currently determining the ratio of ring heater power to the steady-state defocus as a way of measuring the scale of the response.

This ought to give a good way of measuring the scale needed to convert the calculated actuator response into an actual load.

I've attached the rudimentary code below. (The actuator isn't feeding into the heater at the moment, but inserting the "actuation" variable into the load expression is all that is required.)

 

  39   Thu Jun 27 17:12:33 2013 Arnaldo RodriguezOpticsGeneralDefocusing in P-Controlled Manual Simulation

 To test the effectiveness of the PID loop, I've only given a nonzero value to the K_p constant and varied it over a series of runs to verify the response by the controller.

The following is a plot of the baseline compared to the P-active simulations for different proportionality gain constants. I've yet to determine whether all the trends in behavior are physical.

Each different case has an evident droop (steady-state error), and seem to be destabilizing as K_p increases. However, most cases reach steady-state quicker than the baseline.

Defocus_(P_Active).png

 It should be noted that the ring heater is not correcting any effects from the beam, as it is turned off. The ring heater is correcting itself; or rather, its own initial heat pulse of 5 W * delta_t (600s) = 3000 J before the controller becomes active.

  40   Fri Jun 28 11:54:10 2013 Emory BrownOpticsGeneralMaintaining a constant volume while modifying the radii of the test mass faces

 When changing the dimensions of the mirror, we want to keep a constant volume. To do so, we must modify the height of the test mass. The area of the test mass if R is the radius of the front mirror face and r the radius of the back mirror face is (1/3)*pi*h*(R^2+R*r+r^2)=area, so using the values currently in our model, R=r=0.17 m and h=0.2 m, area=0.0181584055 m^3=pi*0.2*0.17^2 m^3, so to ensure that the volume of the test mass remains constant, h=0.01734/(R^2+R*r+r^2). Note that this does give 0.2 m when R=r=0.17 m.

  41   Fri Jun 28 14:03:07 2013 Deep ChatterjeeGeneralGeneralApproach for TE noise for beam in cavity

In this post I mention of the approach that would be taken to solve for the TE noise spectrum for a beam inside the substrate cavity.

Completing the same would be my plan for the next week.

In the COMSOL simulation, a gaussian pressure will be applied on both the flat surface of the cylinder. The strain would be calculated
using the Structural mechanics module and the temperature field would be calculated using the Heat Transfer module. The approach
is similar to that followed in Liu and Thorne. The Work dissipated would be calculated using the gradient of  T. The spectral density is
then calculated using the FDT.

In the attachment, I have written briefly about the material I have studied this week along with my thoughts on the problem of the TE noise
calculation.

  42   Mon Jul 1 13:01:58 2013 Arnaldo RodriguezOpticsGeneralBrief Parameter Study on P-active Control Loop

 The following is a plot of the defocus as a function of time with only the proportional gain being nonzero. Only three cases were run before the program crashed.

K_p.png

The dotted line indicates the setpoint.

One can clearly see the loop becomes unstable and oscillates out of control at a proportional gain of 240, and can see the characteristic steady-state offset of the P-controller from the set point develop in the other cases.

  43   Mon Jul 1 17:31:40 2013 Arnaldo RodriguezOpticsGeneralParameter Study on Sampling Time for P-active Loop

 The following is a plot of the defocus as a function of time for a fixed proportionality gain of 150, and different listed sampling times.

 Deltat.png

The discrepancy between the behaviors is enough to warrant a proper mathematical explanation; the max. overshoot, for example, is inversely proportional to the sampling rate.

 

 

  44   Tue Jul 2 13:32:30 2013 Emory BrownOpticsGeneralUsing Matlab to run our COMSOL simulations

 We want to be able to test a number of values for the ratio of the radii of the frustum which will be much easier once we can get Matlab to automate running our COMSOL model.  I have been able to output the COMSOL model to a .m file and was able to figure out a way to export the Umax value we want to Matlab (see the attached .m file).  

The model ran in Matlab after debugging it for a short while and returned the same result as the COMSOL model had by itself.  I setup a script to loop over some values of RatioRadii and feed them to the model.  The first value it fed to the model worked and returned 1.2099e-10 J for RatioRadii=0.1, but for RatioRadii=0.2 the model had a

meshing error.  I am going to have to see if there is some way we can modify the mesh to fix this error.  When I briefly looked into it today, I found that for several RatioRadii which I tried, the object could be meshed for certain finenesses, but not others.  I am going to spend tomorrow working on the first progress report, but after that is done I will

work on fixing this meshing error.

  45   Wed Jul 3 00:04:46 2013 KojiOpticsGeneralUsing Matlab to run our COMSOL simulations

Please use zipped files instead of uploading extremely long text files on the elog.
Or use wiki or svn instead of elog for uploading them.

And appropriate word wrapping so that we can read the entries. Please.

  46   Thu Jul 4 15:23:47 2013 Deep ChatterjeeOpticsGeneralAttempt to compute TE noise following Liu and Thorne

Liu and Thorne, in their paper have analytically solved for the TE noise spectra considering the test mass to be a half infinite space.

An attempt was made to get similar results using a COMSOL model. In this post, the rough profile of the PSD plot is given and is compared
to Liu and Thorne's result.

Steps followed by Liu and Thorne:

> Oscillating pressure, scaled according to beam profile, is applied one of the surfaces.

> The stress balance equation is solved borrowing algorithm from Landau Lifshitz.

> The stress and the temperature perturbation is related using an equation given in Chapter 1 of LL

> The W_diss is calculated from the gradient of the temperature.

> PSD is calculated using FDT due to Levin

> The resulting plot looks like the following - ***Only the frequency dependence is plotted here leaving  out the prefactors which will
appear just as an additive constant in the figure. The aim was to see how the plot of the simulation looks like.

Liu&Thorne_type.bmp

Steps followed in the COMSOL model:

> 2D axisymmetric model was used since the applied was applied radially symmetrically.

> The dimensions of the test mass(cylinder) was defined larger as compared to the beam spot radius.

> The physics added was Solid Stress and Heat Transfer in Solids.

> Thermal expansion was enabled in the Solid Stress physics

> Pressure work was enabled in Heat Transfer physics which takes into consideration heat due to stresses i.e. adds this heat source to the heat eqn

> Heat insulation wsa applied to all surfaces.

> All surfaces apart from the one where pressure was applied was held fixed to mimic infinity

> A custom mesh was put.

> The model was exported as '.m'

> It was called for frequency range 10^(0 : 0.25 : 4)

> Following Liu and Thorne, the temperature gradient was integrated over the volume using mphint2() function in Matlab

> The time average was taken over the second half of the cycle to avoid transient which are assumed to die off after a couple of initial cycles.

> All the prefactors were ignored while plotting

> The plot shown below is integral{grad_T}^2} / omega^2   which is proportional to PSD

> We just wanted to see if at all we got anything looking similar to the analytic result of Liu and Thorne (shown above)

something_like_TE_1.bmp

The above plot is when the radius is 100 times the beam spot and height of the cylinder is 200 times the beam spot
Other values of radius and height were also tried. The one below shows similar plot as above but for radius 10 times
the beam spot and height 20 times the same

something_like_TE_1_10times.bmp

While the one below is for radius = 1000 * beam spot and height = 2000 * beam spot

something_like_TE_1_1000times.bmp

Here, it is seen that the straight line with a negative slope is seen to some extent.

However, the prefactors, when put in, will show the actual PSD.

Any comments or suggestions related to the model construction in COMSOL or otherwise is welcome.

  47   Fri Jul 5 14:06:24 2013 Deep ChatterjeeOpticsGeneralAttempt to compute TE noise following Liu and Thorne

Quote:

Liu and Thorne, in their paper have analytically solved for the TE noise spectra considering the test mass to be a half infinite space.

An attempt was made to get similar results using a COMSOL model. In this post, the rough profile of the PSD plot is given and is compared
to Liu and Thorne's result.

Steps followed by Liu and Thorne:

> Oscillating pressure, scaled according to beam profile, is applied one of the surfaces.

> The stress balance equation is solved borrowing algorithm from Landau Lifshitz.

> The stress and the temperature perturbation is related using an equation given in Chapter 1 of LL

> The W_diss is calculated from the gradient of the temperature.

> PSD is calculated using FDT due to Levin

> The resulting plot looks like the following - ***Only the frequency dependence is plotted here leaving  out the prefactors which will
appear just as an additive constant in the figure. The aim was to see how the plot of the simulation looks like.

Liu&Thorne_type.bmp

Steps followed in the COMSOL model:

> 2D axisymmetric model was used since the applied was applied radially symmetrically.

> The dimensions of the test mass(cylinder) was defined larger as compared to the beam spot radius.

> The physics added was Solid Stress and Heat Transfer in Solids.

> Thermal expansion was enabled in the Solid Stress physics

> Pressure work was enabled in Heat Transfer physics which takes into consideration heat due to stresses i.e. adds this heat source to the heat eqn

> Heat insulation wsa applied to all surfaces.

> All surfaces apart from the one where pressure was applied was held fixed to mimic infinity

> A custom mesh was put.

> The model was exported as '.m'

> It was called for frequency range 10^(0 : 0.25 : 4)

> Following Liu and Thorne, the temperature gradient was integrated over the volume using mphint2() function in Matlab

> The time average was taken over the second half of the cycle to avoid transient which are assumed to die off after a couple of initial cycles.

> All the prefactors were ignored while plotting

> The plot shown below is integral{grad_T}^2} / omega^2   which is proportional to PSD

> We just wanted to see if at all we got anything looking similar to the analytic result of Liu and Thorne (shown above)

something_like_TE_1.bmp

The above plot is when the radius is 100 times the beam spot and height of the cylinder is 200 times the beam spot
Other values of radius and height were also tried. The one below shows similar plot as above but for radius 10 times
the beam spot and height 20 times the same

something_like_TE_1_10times.bmp

While the one below is for radius = 1000 * beam spot and height = 2000 * beam spot

something_like_TE_1_1000times.bmp

Here, it is seen that the straight line with a negative slope is seen to some extent.

However, the prefactors, when put in, will show the actual PSD.

Any comments or suggestions related to the model construction in COMSOL or otherwise is welcome.

 Here is a plot showing the profiles of Liu and Thorne and the COMSOL simulation. Since the constants were not taken into account, one expects the plot to be shifted by a constant equal to the logarithm of the prefactor that has been ignored.

comparison.bmp

The green 'o' is just a 1/omega^2 plot in the loglog scale which is how Liu and Thorne's result go (this is not linearized PSD, but is doesn't matter as long as we want to see the profiles). The other plot in blue is the COMSOL simulation.

The plot below is a difference between them. One expects it to be a constant but there are a few jitters. Once again, it is emphasized that the numerical values do not give any information related to the actual difference which will only be calculable
once the correct physical constants are put in the formula. I will post another entry once that is done

L&T_COMSOL_difference.bmp

  48   Mon Jul 8 15:47:23 2013 Emory BrownOpticsGeneralMeshing error when varying geometry

 I attempted to run the Matlab code built last week, but received an error that the mesh failed to generate on the inner domain/failed to respect edge element on geometry edge.  The error occurred on the second computation with ratioR=0.2, but for ratioR=0.1 the simulation completed successfully.  I reproduced the error in COMSOL and noted that for meshes with size at least as course as "course" or extremely fine, a mesh could be constructed, but for sizes in between an error was returned.  This region of sizes which throw errors varies for different values of ratioR.  By specifying an edge selection of the central line running down the frustum and another along the top edge of the inner cylinder and meshing points on those edges first the rest of the meshing is forced to use those nodes as a seed.

I also noted our COMSOL model had an error: ratioR was applied to the wrong face.  This was corrected as was the .m file.

I added an eigenfrequency study and ran it for several values of ratioR, obtaining the following:

ratioR Lowest Drumhead mode (Hz) Lowest Butterfly mode (Hz)

0.1 3624.8 3802.4

0.3 4375.9 3785.4

0.5 4366.5 3650.0

.75 3709.0 3041.85

1 3000 2186.3

1.1 2736.2 1893.0

1.3 2247.6 1426.4

 

The mirror's front face is 0.17 [m].  Its Gaussian beam size is 0.0156 [m].  Its height is given by 0.01734[m^3]/(R^2*(1+ratioR+ratioR^2)) such that when the two faces have the same radii it is 0.2 [m] long.

  49   Mon Jul 8 18:39:31 2013 Matt A.OpticsGeneralMeshing error when varying geometry

Quote:

 I attempted to run the Matlab code built last week, but received an error that the mesh failed to generate on the inner domain/failed to respect edge element on geometry edge.  The error occurred on the second computation with ratioR=0.2, but for ratioR=0.1 the simulation completed successfully.  I reproduced the error in COMSOL and noted that for meshes with size at least as course as "course" or extremely fine, a mesh could be constructed, but for sizes in between an error was returned.  This region of sizes which throw errors varies for different values of ratioR.  By specifying an edge selection of the central line running down the frustum and another along the top edge of the inner cylinder and meshing points on those edges first the rest of the meshing is forced to use those nodes as a seed.

I also noted our COMSOL model had an error: ratioR was applied to the wrong face.  This was corrected as was the .m file.

I added an eigenfrequency study and ran it for several values of ratioR, obtaining the following:

ratioR Lowest Drumhead mode (Hz) Lowest Butterfly mode (Hz)

0.1 3624.8 3802.4

0.3 4375.9 3785.4

0.5 4366.5 3650.0

.75 3709.0 3041.85

1 3000 2186.3

1.1 2736.2 1893.0

1.3 2247.6 1426.4

 

The mirror's front face is 0.17 [m].  Its Gaussian beam size is 0.0156 [m].  Its height is given by 0.01734[m^3]/(R^2*(1+ratioR+ratioR^2)) such that when the two faces have the same radii it is 0.2 [m] long.

 Great Emory,

Can you put these in a plot so it's easier to read?

  50   Mon Jul 8 19:04:35 2013 Matt A.OpticsGeneralMeshing error when varying geometry

Quote:

 I attempted to run the Matlab code built last week, but received an error that the mesh failed to generate on the inner domain/failed to respect edge element on geometry edge.  The error occurred on the second computation with ratioR=0.2, but for ratioR=0.1 the simulation completed successfully.  I reproduced the error in COMSOL and noted that for meshes with size at least as course as "course" or extremely fine, a mesh could be constructed, but for sizes in between an error was returned.  This region of sizes which throw errors varies for different values of ratioR.  By specifying an edge selection of the central line running down the frustum and another along the top edge of the inner cylinder and meshing points on those edges first the rest of the meshing is forced to use those nodes as a seed.

I also noted our COMSOL model had an error: ratioR was applied to the wrong face.  This was corrected as was the .m file.

I added an eigenfrequency study and ran it for several values of ratioR, obtaining the following:

ratioR Lowest Drumhead mode (Hz) Lowest Butterfly mode (Hz)

0.1 3624.8 3802.4

0.3 4375.9 3785.4

0.5 4366.5 3650.0

.75 3709.0 3041.85

1 3000 2186.3

1.1 2736.2 1893.0

1.3 2247.6 1426.4

 

The mirror's front face is 0.17 [m].  Its Gaussian beam size is 0.0156 [m].  Its height is given by 0.01734[m^3]/(R^2*(1+ratioR+ratioR^2)) such that when the two faces have the same radii it is 0.2 [m] long.

 When we talked today, I thought that these frequencies were a little low, so I ran a really simple COMSOL model of a cylinder with radius 0.17 m and height 0.2 m (attached). 

I solved for the first 10 modes (the first 6 being trivial), and the frequencies I got are listed below:

Mode #          Freq [Hz]          Type

7                      5950                 Butterfly

8                      5950                 Butterfly

9                      8106                 Drumhead

10                   8226                 Shear

These are more in the frequency range that I expected. 

**What material are you using? I used fused silica.

**I used 'finer' meshing. Perhaps your more complicated meshing is screwing with the solutions, although I'd expect it to make it stiffer, not softer.

**Are you applying force during the eigenvalue calculation? That might make it softer.

**Perhaps some of your constraints are moving the modes around. My model has zero constraints: it's just a cylinder floating in space.

Lets talk about this tomorrow.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  51   Tue Jul 9 14:45:04 2013 Emory BrownOpticsGeneralMeshing error when varying geometry

I tried removing the constraints and applied force and was able to get close to the same frequencies for the butterfly modes as the simple model.  By also removing the interior cylinder from our model I was able to restore the butterfly modes as well.  I can see why removing the constraints and forces would make a difference, but I don't understand how the interior region which was only used to aid in making the meshing in the central region more dense would have such a strong effect. With that removed as well, we get the following results using a finer mesh (plot attached):

ratioR  Lowest Drumhead mode (Hz) Lowest Butterfly mode (Hz) Any lower modes (Hz)

0.1 8777.8 7253.3 3059.7

0.3 5636.9 7264.7 4202.3

0.5 6068.5 7308.0 5980.9

0.75 7341.5 7183.0 no

1 8110.2 5951.3 no

1.1 7302.8 5308.8 no

1.3 5744.3 4087.9 no

 

This data is more in line with what we would expect, and indicates that the optimal region is probably between ratioR=0.6 and ratioR=0.8.  I will run the looping script we designed to map out how Umax changes when varying ratioR, particularly in this interesting region.

 

This line was used to generate the plot from data.

figure(1); plot(ratio,drum); hold on; plot(ratio,butterfly,'-rs'); plot(ratio(1:3),others,'g'); hleg1=legend('Drumhead','Butterfly','Other'); title('Eigenfrequencies of mode types for different ratioR values'); xlabel('ratioR'); ylabel('lowest eigenfrequency'); shg;

 

Quote:

Quote:

 I attempted to run the Matlab code built last week, but received an error that the mesh failed to generate on the inner domain/failed to respect edge element on geometry edge.  The error occurred on the second computation with ratioR=0.2, but for ratioR=0.1 the simulation completed successfully.  I reproduced the error in COMSOL and noted that for meshes with size at least as course as "course" or extremely fine, a mesh could be constructed, but for sizes in between an error was returned.  This region of sizes which throw errors varies for different values of ratioR.  By specifying an edge selection of the central line running down the frustum and another along the top edge of the inner cylinder and meshing points on those edges first the rest of the meshing is forced to use those nodes as a seed.

I also noted our COMSOL model had an error: ratioR was applied to the wrong face.  This was corrected as was the .m file.

I added an eigenfrequency study and ran it for several values of ratioR, obtaining the following:

ratioR Lowest Drumhead mode (Hz) Lowest Butterfly mode (Hz)

0.1 3624.8 3802.4

0.3 4375.9 3785.4

0.5 4366.5 3650.0

.75 3709.0 3041.85

1 3000 2186.3

1.1 2736.2 1893.0

1.3 2247.6 1426.4

 

The mirror's front face is 0.17 [m].  Its Gaussian beam size is 0.0156 [m].  Its height is given by 0.01734[m^3]/(R^2*(1+ratioR+ratioR^2)) such that when the two faces have the same radii it is 0.2 [m] long.

 When we talked today, I thought that these frequencies were a little low, so I ran a really simple COMSOL model of a cylinder with radius 0.17 m and height 0.2 m (attached). 

I solved for the first 10 modes (the first 6 being trivial), and the frequencies I got are listed below:

Mode #          Freq [Hz]          Type

7                      5950                 Butterfly

8                      5950                 Butterfly

9                      8106                 Drumhead

10                   8226                 Shear

These are more in the frequency range that I expected. 

**What material are you using? I used fused silica.

**I used 'finer' meshing. Perhaps your more complicated meshing is screwing with the solutions, although I'd expect it to make it stiffer, not softer.

**Are you applying force during the eigenvalue calculation? That might make it softer.

**Perhaps some of your constraints are moving the modes around. My model has zero constraints: it's just a cylinder floating in space.

Lets talk about this tomorrow. 

 

  52   Wed Jul 10 14:15:20 2013 Emory BrownOpticsGeneralComparison of Umax and the frequency of the lowest eigenmode against ratioR

 I was able to run the looper program designed last week over the interval ratioR=[0.5, 0.9] with a step size of 0.01 and obtained the plot below with a minimal value of  Umax=1.4723e-10 J obtained for ratioR=0.71, which is about 3.2% less than the value of Umax=1.5202e-10 J when ratioR=1.  This is not very significant, but the shifting upward of the frequencies of the lowest eigenmodes as described in the previous post is.  Additionally, these curves both have their optimal points in the same region, with a ratioR value of about 0.7.

I also ran a higher resolution test to see how the frequency of the lowest real eigenmode responded to changes in ratioR over this region.  The plot generated is also attached with a maximal (most favorable) value of 7210.0 Hz at ratioR=0.74.

Data from both of these runs is included in the attached tarball stored as txt files delineated by tabs.

The next few things to try are substituting silicon for fused silica as the material in the model and seeing how the curves change and seeing the response from reversing the orientation of the optimal test mass (ratioR~0.72).  I expect that the orientation change will result in much higher noise and a lower minimal real eigenfrequency.

  53   Wed Jul 10 17:52:18 2013 KojiGeneralGeneralHow to force time steps for a time dependent simulation

A common trap in COMSOL:

When you run a time series simulation, COMSOL tries to be "clever" by skipping some time steps
and returns you an interpolated result in order to accelerate the calculation.
But for certain types of applications, such as time series response analysis by applying periodic force/heat,
this "clever" adaptive algorithm messes up our calculation.

You can apply forced time steps by giving a specific option:
- In Model Builder, open your study. Then open your Solver
- Click "Time-Dependent Solver" in Model Builder
- You get bunch of options in Time-Dependent Solver pane.
  Open "Time Stepping".
- Change "Method" from "Generalized alpha" to "BDF".
- Change "Steps taken by solver" to "Strict"

Then, you should be OK.

This can be done by

model.sol('sol1').feature('t1').set('tstepsbdf', 'strict');

in COMSOL with MATLAB. (Of course sol1 and t1 should be changed appropriately.)

  54   Thu Jul 11 19:16:12 2013 Deep ChatterjeeGeneralGeneralTE noise problem - Matlab script

The present aim is the calculation of the TE noise like Liu and Thorne. Although, the results of Liu and Thorne are for the case of an infinite mirror, in our case, we try
to model a test mass with large dimensions in an attempt to get closer to the result due to Liu and Thorne

Following my previous post - The presents results given by the COMSOL simulations gave the same profile as Liu and Thorne's result which has a frequency dependence
of 1/omega^2 but was displaced from the analytic result by a constant factor which was dependent on the applied pressure on the face of the test mass which should not be
the case.

Following the steps followed Liu and Thorne, we had constructed the test mass as a cylinder, large compared to the beam spot size. An oscillating pressure was applied
to one of the faces and the from the temperature gradient generated in the process due to strains, one can calculate the work dissipated. The process involves integrating
the gradient of temperature over the entire geometry and taking the time avrage. However, this did not give the correct results, so it was decide to extract the Fourier coefficient
of the signal and perform the integration on it, as done in the case of TR niose by Koji Arai.

I mention the steps it was done -

> The data extracted was stored in a 3D array in matlab. using mphinterp - each dimension for r, z, t

> The number of radial slices and z slices is defined by the user previously

> For each r,z value there was a time signal.

> The fourier coefficient corresponding to the pressure oscillation frequency was extracted from the last three cycles
(In theory only one cycle should suffice)

> The above step was done so that random data( which is small in magnitude) generated by COMSOL is avoided.

> The fourier coefficients are stored in a 2D array corresponding to r and z values.

> The integration was performed using trapz twice once on each dimension to get the total volume integral

> The rest of the calculation is same as the previous script - plugging in the prefactors in the formulae and plotting

 

**The primary problem with this script is that the data extraction takes significant amount of time - For a mirror with 200 times the radius of the beam spot and 200 radial slices, it takes close to 6 minutes
to evaluate work dissipated for each frequency. The script solves for 16 frequency values. The results for small number of radial slices does not follow the straight line profile. For larger number of slices
the program takes a longer time. The results have not been checked yet.

  55   Fri Jul 12 00:09:17 2013 Emory BrownOpticsGeneralAnalysis of substrate Brownian noise in a silicon test mass with changing ratioR value

 I performed the same analysis we previously did on a test mass made of silicon (using the built-in silicon within COMSOL) and obtained the attached plots.  The plots show more of a difference between the two solutions optimal points than for fused silica, but they are still quite close.  All data is included in the attached tarball.  The values for ratioR=1 or a cylindrical test mass place the frequency of the lowest real eigenmode at 8491 Hz and the Umax value of  6.5484*10^-11 J.

  56   Fri Jul 12 00:31:11 2013 Emory BrownOpticsGeneralReversed face mirror design

 We had noticed that when we ran an eigenfrequency analysis, there was often a node (see attached screenshot) on the face opposite the applied force.  This indicated that the noise might be lowered by reversing the face the force was applied to, but it also seems like this would be equivalent to increasing the ratioR value and making the primary face smaller while retaining the mass of the test mass.  It seems worthwhile to see how the Umax values compare for a beam incident on either face of a test mass in the optimal region with Umax=0.71.  For the initial configuration, Umax=1.47228*10^-10 J and changing the side of the mirror the force is applied to we get Umax=1.47148*10^-10 J, which is about the same value.

  57   Fri Jul 12 19:43:32 2013 Deep ChatterjeeGeneralGeneralTE noise problem - Matlab script

Quote:

The present aim is the calculation of the TE noise like Liu and Thorne. Although, the results of Liu and Thorne are for the case of an infinite mirror, in our case, we try
to model a test mass with large dimensions in an attempt to get closer to the result due to Liu and Thorne

Following my previous post - The presents results given by the COMSOL simulations gave the same profile as Liu and Thorne's result which has a frequency dependence
of 1/omega^2 but was displaced from the analytic result by a constant factor which was dependent on the applied pressure on the face of the test mass which should not be
the case.

Following the steps followed Liu and Thorne, we had constructed the test mass as a cylinder, large compared to the beam spot size. An oscillating pressure was applied
to one of the faces and the from the temperature gradient generated in the process due to strains, one can calculate the work dissipated. The process involves integrating
the gradient of temperature over the entire geometry and taking the time avrage. However, this did not give the correct results, so it was decide to extract the Fourier coefficient
of the signal and perform the integration on it, as done in the case of TR niose by Koji Arai.

I mention the steps it was done -

> The data extracted was stored in a 3D array in matlab. using mphinterp - each dimension for r, z, t

> The number of radial slices and z slices is defined by the user previously

> For each r,z value there was a time signal.

> The fourier coefficient corresponding to the pressure oscillation frequency was extracted from the last three cycles
(In theory only one cycle should suffice)

> The above step was done so that random data( which is small in magnitude) generated by COMSOL is avoided.

> The fourier coefficients are stored in a 2D array corresponding to r and z values.

> The integration was performed using trapz twice once on each dimension to get the total volume integral

> The rest of the calculation is same as the previous script - plugging in the prefactors in the formulae and plotting

 

**The primary problem with this script is that the data extraction takes significant amount of time - For a mirror with 200 times the radius of the beam spot and 200 radial slices, it takes close to 6 minutes
to evaluate work dissipated for each frequency. The script solves for 16 frequency values. The results for small number of radial slices does not follow the straight line profile. For larger number of slices
the program takes a longer time. The results have not been checked yet.

 I am replying to report of the modification made to the script from the last one. The problem of too many radial and z slices have been avoided by using a slicing based on a gaussian
distribution both along the r and z directions - i.e. the slicing is heavy in the region around the surface is applied and much thinner towards the edges of the cylinder. The slicing has
been separately handled by a function named giveSlices() which does the slicing and returns the values as two arrays corresponding to r and z.
The extent to which the fineness of slicing is controlled in the geometry is by controlling the parameter SD in the code which is the standard deviation of the gaussian according to which
the slicing is controlled as being fine throughout or fine in the centre and thin with increasing r.

This method reduces the number of slices by almost 2 orders for significant large values of the dimensions of the test mass while it is expected to give similar results since slicing the
test mass finely at the edge is not required as the gradient of temperature almost falls to zero.

It is suspected that the long time of simulation is attributed to calling mphinterp() command a large number of times. In my next modification, it will be tried to use the command just once
followed by the proper data extraction from the output given by the command.

 

  58   Sun Jul 14 15:13:46 2013 Deep ChatterjeeGeneralGeneralTE noise problem - Matlab script

Quote:

Quote:

The present aim is the calculation of the TE noise like Liu and Thorne. Although, the results of Liu and Thorne are for the case of an infinite mirror, in our case, we try
to model a test mass with large dimensions in an attempt to get closer to the result due to Liu and Thorne

Following my previous post - The presents results given by the COMSOL simulations gave the same profile as Liu and Thorne's result which has a frequency dependence
of 1/omega^2 but was displaced from the analytic result by a constant factor which was dependent on the applied pressure on the face of the test mass which should not be
the case.

Following the steps followed Liu and Thorne, we had constructed the test mass as a cylinder, large compared to the beam spot size. An oscillating pressure was applied
to one of the faces and the from the temperature gradient generated in the process due to strains, one can calculate the work dissipated. The process involves integrating
the gradient of temperature over the entire geometry and taking the time avrage. However, this did not give the correct results, so it was decide to extract the Fourier coefficient
of the signal and perform the integration on it, as done in the case of TR niose by Koji Arai.

I mention the steps it was done -

> The data extracted was stored in a 3D array in matlab. using mphinterp - each dimension for r, z, t

> The number of radial slices and z slices is defined by the user previously

> For each r,z value there was a time signal.

> The fourier coefficient corresponding to the pressure oscillation frequency was extracted from the last three cycles
(In theory only one cycle should suffice)

> The above step was done so that random data( which is small in magnitude) generated by COMSOL is avoided.

> The fourier coefficients are stored in a 2D array corresponding to r and z values.

> The integration was performed using trapz twice once on each dimension to get the total volume integral

> The rest of the calculation is same as the previous script - plugging in the prefactors in the formulae and plotting

 

**The primary problem with this script is that the data extraction takes significant amount of time - For a mirror with 200 times the radius of the beam spot and 200 radial slices, it takes close to 6 minutes
to evaluate work dissipated for each frequency. The script solves for 16 frequency values. The results for small number of radial slices does not follow the straight line profile. For larger number of slices
the program takes a longer time. The results have not been checked yet.

 I am replying to report of the modification made to the script from the last one. The problem of too many radial and z slices have been avoided by using a slicing based on a gaussian
distribution both along the r and z directions - i.e. the slicing is heavy in the region around the surface is applied and much thinner towards the edges of the cylinder. The slicing has
been separately handled by a function named giveSlices() which does the slicing and returns the values as two arrays corresponding to r and z.
The extent to which the fineness of slicing is controlled in the geometry is by controlling the parameter SD in the code which is the standard deviation of the gaussian according to which
the slicing is controlled as being fine throughout or fine in the centre and thin with increasing r.

This method reduces the number of slices by almost 2 orders for significant large values of the dimensions of the test mass while it is expected to give similar results since slicing the
test mass finely at the edge is not required as the gradient of temperature almost falls to zero.

It is suspected that the long time of simulation is attributed to calling mphinterp() command a large number of times. In my next modification, it will be tried to use the command just once
followed by the proper data extraction from the output given by the command.

 

 Following the previous reply regarding the use of mphinterp(), the appropriate changes in code were made. The overhead time due to the call to COMSOL was responsible for the longer
simulation time. Right now, for relatively large no. of total slices (about 27000) just the extraction of data happens within a few seconds. However, for the larger number of slices, the codes 
will probably still take some time to complete. The codes are attached.

  59   Mon Jul 15 13:14:30 2013 Emory BrownOpticsGeneralUmax curves for varying height test masses

 I ran sweeps over the ratioR range from 0.5 to 0.9 for test masses with modified height, and thus mass, which were otherwise equivalent to our previous test mass.  The attached plot was generated and indicates that the optimal ratioR value for the test mass was shifted significantly, for the half mass test mass into lower frequency regions, and for the 10x mass test mass into higher frequency ranges.  I took the data collected from the half mass run and fit a polynomial of degree 2 to it in Matlab using the command p=polyfit(x,y,2) and obtained p=1.089*10^-10*x^2 - 1.024*10^-10*x +1.774*10^-10 which has a minimum value for ratioR=0.47.  This fits with the plot generated as it appears to be near its minumum value, but I should run the simulation more around this value to see if it fits the expected behaviour.  I also did this fitting for the 10x mass curve, but based on the greater variance in the curve over this region of ratioR values I don't expect the predicted minimum to be as accurate, so if we want to find it we will have to search that region of ratioR values. For the 10x mass test mass, p=4.459*10^-10*x^2 - 8.859*10^-10*x + 6.289*10^-10 which has a minimum of about 1.

I will run simulations in these regions overnight, and edit this post with the plots/results.

  60   Mon Jul 15 16:05:29 2013 Deep ChatterjeeGeneralGeneralTE noise problem - Matlab script

Quote:

Quote:

Quote:

The present aim is the calculation of the TE noise like Liu and Thorne. Although, the results of Liu and Thorne are for the case of an infinite mirror, in our case, we try
to model a test mass with large dimensions in an attempt to get closer to the result due to Liu and Thorne

Following my previous post - The presents results given by the COMSOL simulations gave the same profile as Liu and Thorne's result which has a frequency dependence
of 1/omega^2 but was displaced from the analytic result by a constant factor which was dependent on the applied pressure on the face of the test mass which should not be
the case.

Following the steps followed Liu and Thorne, we had constructed the test mass as a cylinder, large compared to the beam spot size. An oscillating pressure was applied
to one of the faces and the from the temperature gradient generated in the process due to strains, one can calculate the work dissipated. The process involves integrating
the gradient of temperature over the entire geometry and taking the time avrage. However, this did not give the correct results, so it was decide to extract the Fourier coefficient
of the signal and perform the integration on it, as done in the case of TR niose by Koji Arai.

I mention the steps it was done -

> The data extracted was stored in a 3D array in matlab. using mphinterp - each dimension for r, z, t

> The number of radial slices and z slices is defined by the user previously

> For each r,z value there was a time signal.

> The fourier coefficient corresponding to the pressure oscillation frequency was extracted from the last three cycles
(In theory only one cycle should suffice)

> The above step was done so that random data( which is small in magnitude) generated by COMSOL is avoided.

> The fourier coefficients are stored in a 2D array corresponding to r and z values.

> The integration was performed using trapz twice once on each dimension to get the total volume integral

> The rest of the calculation is same as the previous script - plugging in the prefactors in the formulae and plotting

 

**The primary problem with this script is that the data extraction takes significant amount of time - For a mirror with 200 times the radius of the beam spot and 200 radial slices, it takes close to 6 minutes
to evaluate work dissipated for each frequency. The script solves for 16 frequency values. The results for small number of radial slices does not follow the straight line profile. For larger number of slices
the program takes a longer time. The results have not been checked yet.

 I am replying to report of the modification made to the script from the last one. The problem of too many radial and z slices have been avoided by using a slicing based on a gaussian
distribution both along the r and z directions - i.e. the slicing is heavy in the region around the surface is applied and much thinner towards the edges of the cylinder. The slicing has
been separately handled by a function named giveSlices() which does the slicing and returns the values as two arrays corresponding to r and z.
The extent to which the fineness of slicing is controlled in the geometry is by controlling the parameter SD in the code which is the standard deviation of the gaussian according to which
the slicing is controlled as being fine throughout or fine in the centre and thin with increasing r.

This method reduces the number of slices by almost 2 orders for significant large values of the dimensions of the test mass while it is expected to give similar results since slicing the
test mass finely at the edge is not required as the gradient of temperature almost falls to zero.

It is suspected that the long time of simulation is attributed to calling mphinterp() command a large number of times. In my next modification, it will be tried to use the command just once
followed by the proper data extraction from the output given by the command.

 

 Following the previous reply regarding the use of mphinterp(), the appropriate changes in code were made. The overhead time due to the call to COMSOL was responsible for the longer
simulation time. Right now, for relatively large no. of total slices (about 27000) just the extraction of data happens within a few seconds. However, for the larger number of slices, the codes 
will probably still take some time to complete. The codes are attached.

 The dependence of the Power Spectral Density on the parameters F0, which is the pressure amplitude, has been somewhat corrected for in the codes attached. The mistake lay in the fact that
extraction of the Fourier coefficients was being done for the ht.gradTmag, the Fourier coefficients of which are not the correct ones to be used in this case since ht.gradTmag is not the correct time signal.
In the present case the Fourier coefficients are extracted from the r and z components, squared and added to carry out the calculation. However, the results are still off from the L&T results by order of 5.
The codes and the plots are attached.

Jul_15.bmp

The red values are the L&T result while the blue sketch is the simulation

  61   Tue Jul 23 18:26:04 2013 Deep ChatterjeeOpticsGeneralComparison between Liu and Thorne Results and COMSOL results for TE noise

In this post I report of the results of TE noise simulated by COMSOL for the TE noise of Infinite test masses.

The aim was to follow the procedure by Liu and Thorne in their analytic calculations so that the same model could be used for the other
geometries.

The simulation is done in a different way than the TR simulations. It was observed that the output given by COMSOL by the use of commands
like mphinterp() or taking an export resulted in certain discrepancies between the results computed in COMSOL and that read by MATLAB.

Thus, the volume integration of the temperature gradient is performed in COMSOL itself and the results of the integration for each time
are sent to files. Matlab read these values and time averages them to get the result as in the paper (Sec. 2 of Liu and Thorne).

The errors expected are
> Fourier analysis is not done at all. This would have involved exporting data which, as mentioned before is giving errors

> The numerical errors by COMSOL are therefore not filtered off.

> The plot differs from the analytic solution for larger frequencies over 3000 Hz.

> It is to be noted from the paper by Liu and Thorne that the TE noise for the finite and infinite case are not very different. In
fact the correction factor goes as O(1). Thus, differences between finite and inifinte cases are unlikely to be prominent
in the log scale plots

 

 The codes are put as a zip file. Corrections made to the codes will be uploaded as a reply.

Jul_23.bmp


  67   Tue Jul 23 20:53:37 2013 Deep ChatterjeeOpticsGeneralComparison between Liu and Thorne Results and COMSOL results for TE noise

Quote:

In this post I report of the results of TE noise simulated by COMSOL for the TE noise of Infinite test masses.

The aim was to follow the procedure by Liu and Thorne in their analytic calculations so that the same model could be used for the other
geometries.

The simulation is done in a different way than the TR simulations. It was observed that the output given by COMSOL by the use of commands
like mphinterp() or taking an export resulted in certain discrepancies between the results computed in COMSOL and that read by MATLAB.

Thus, the volume integration of the temperature gradient is performed in COMSOL itself and the results of the integration for each time
are sent to files. Matlab read these values and time averages them to get the result as in the paper (Sec. 2 of Liu and Thorne).

The errors expected are
> Fourier analysis is not done at all. This would have involved exporting data which, as mentioned before is giving errors

> The numerical errors by COMSOL are therefore not filtered off.

> The plot differs from the analytic solution for larger frequencies over 3000 Hz.

> It is to be noted from the paper by Liu and Thorne that the TE noise for the finite and infinite case are not very different. In
fact the correction factor goes as O(1). Thus, differences between finite and inifinte cases are unlikely to be prominent
in the log scale plots

 

 The codes are put as a zip file. Corrections made to the codes will be uploaded as a reply.

Jul_23.bmp


 Here is another plot with a mesh size slightly finer than the default Extra fine mesh in COMSOL.

One may notice that the value for the final frequency i.e. 10000Hz is different from the previous plot. 
It maybe that the error for the higher frequencies is a result of the FEA. However, it may also be that
the appropriate boundary conditions required for an infinite model break down at high frequencies.

  66   Tue Jul 23 20:53:37 2013 Deep ChatterjeeOpticsGeneralComparison between Liu and Thorne Results and COMSOL results for TE noise

Quote:

In this post I report of the results of TE noise simulated by COMSOL for the TE noise of Infinite test masses.

The aim was to follow the procedure by Liu and Thorne in their analytic calculations so that the same model could be used for the other
geometries.

The simulation is done in a different way than the TR simulations. It was observed that the output given by COMSOL by the use of commands
like mphinterp() or taking an export resulted in certain discrepancies between the results computed in COMSOL and that read by MATLAB.

Thus, the volume integration of the temperature gradient is performed in COMSOL itself and the results of the integration for each time
are sent to files. Matlab read these values and time averages them to get the result as in the paper (Sec. 2 of Liu and Thorne).

The errors expected are
> Fourier analysis is not done at all. This would have involved exporting data which, as mentioned before is giving errors

> The numerical errors by COMSOL are therefore not filtered off.

> The plot differs from the analytic solution for larger frequencies over 3000 Hz.

> It is to be noted from the paper by Liu and Thorne that the TE noise for the finite and infinite case are not very different. In
fact the correction factor goes as O(1). Thus, differences between finite and inifinte cases are unlikely to be prominent
in the log scale plots

 

 The codes are put as a zip file. Corrections made to the codes will be uploaded as a reply.

Jul_23.bmp


 Here is another plot with a mesh size slightly finer than the default Extra fine mesh in COMSOL.

One may notice that the value for the final frequency i.e. 10000Hz is different from the previous plot. 
It maybe that the error for the higher frequencies is a result of the FEA. However, it may also be that
the appropriate boundary conditions required for an infinite model break down at high frequencies.

  65   Tue Jul 23 20:53:37 2013 Deep ChatterjeeOpticsGeneralComparison between Liu and Thorne Results and COMSOL results for TE noise

Quote:

In this post I report of the results of TE noise simulated by COMSOL for the TE noise of Infinite test masses.

The aim was to follow the procedure by Liu and Thorne in their analytic calculations so that the same model could be used for the other
geometries.

The simulation is done in a different way than the TR simulations. It was observed that the output given by COMSOL by the use of commands
like mphinterp() or taking an export resulted in certain discrepancies between the results computed in COMSOL and that read by MATLAB.

Thus, the volume integration of the temperature gradient is performed in COMSOL itself and the results of the integration for each time
are sent to files. Matlab read these values and time averages them to get the result as in the paper (Sec. 2 of Liu and Thorne).

The errors expected are
> Fourier analysis is not done at all. This would have involved exporting data which, as mentioned before is giving errors

> The numerical errors by COMSOL are therefore not filtered off.

> The plot differs from the analytic solution for larger frequencies over 3000 Hz.

> It is to be noted from the paper by Liu and Thorne that the TE noise for the finite and infinite case are not very different. In
fact the correction factor goes as O(1). Thus, differences between finite and inifinte cases are unlikely to be prominent
in the log scale plots

 

 The codes are put as a zip file. Corrections made to the codes will be uploaded as a reply.

Jul_23.bmp


 Here is another plot with a mesh size slightly finer than the default Extra fine mesh in COMSOL.

One may notice that the value for the final frequency i.e. 10000Hz is different from the previous plot. 
It maybe that the error for the higher frequencies is a result of the FEA. However, it may also be that
the appropriate boundary conditions required for an infinite model break down at high frequencies.

  64   Tue Jul 23 20:53:37 2013 Deep ChatterjeeOpticsGeneralComparison between Liu and Thorne Results and COMSOL results for TE noise

Quote:

In this post I report of the results of TE noise simulated by COMSOL for the TE noise of Infinite test masses.

The aim was to follow the procedure by Liu and Thorne in their analytic calculations so that the same model could be used for the other
geometries.

The simulation is done in a different way than the TR simulations. It was observed that the output given by COMSOL by the use of commands
like mphinterp() or taking an export resulted in certain discrepancies between the results computed in COMSOL and that read by MATLAB.

Thus, the volume integration of the temperature gradient is performed in COMSOL itself and the results of the integration for each time
are sent to files. Matlab read these values and time averages them to get the result as in the paper (Sec. 2 of Liu and Thorne).

The errors expected are
> Fourier analysis is not done at all. This would have involved exporting data which, as mentioned before is giving errors

> The numerical errors by COMSOL are therefore not filtered off.

> The plot differs from the analytic solution for larger frequencies over 3000 Hz.

> It is to be noted from the paper by Liu and Thorne that the TE noise for the finite and infinite case are not very different. In
fact the correction factor goes as O(1). Thus, differences between finite and inifinte cases are unlikely to be prominent
in the log scale plots

 

 The codes are put as a zip file. Corrections made to the codes will be uploaded as a reply.

Jul_23.bmp


 Here is another plot with a mesh size slightly finer than the default Extra fine mesh in COMSOL.

One may notice that the value for the final frequency i.e. 10000Hz is different from the previous plot. 
It maybe that the error for the higher frequencies is a result of the FEA. However, it may also be that
the appropriate boundary conditions required for an infinite model break down at high frequencies.

  63   Tue Jul 23 20:53:37 2013 Deep ChatterjeeOpticsGeneralComparison between Liu and Thorne Results and COMSOL results for TE noise

Quote:

In this post I report of the results of TE noise simulated by COMSOL for the TE noise of Infinite test masses.

The aim was to follow the procedure by Liu and Thorne in their analytic calculations so that the same model could be used for the other
geometries.

The simulation is done in a different way than the TR simulations. It was observed that the output given by COMSOL by the use of commands
like mphinterp() or taking an export resulted in certain discrepancies between the results computed in COMSOL and that read by MATLAB.

Thus, the volume integration of the temperature gradient is performed in COMSOL itself and the results of the integration for each time
are sent to files. Matlab read these values and time averages them to get the result as in the paper (Sec. 2 of Liu and Thorne).

The errors expected are
> Fourier analysis is not done at all. This would have involved exporting data which, as mentioned before is giving errors

> The numerical errors by COMSOL are therefore not filtered off.

> The plot differs from the analytic solution for larger frequencies over 3000 Hz.

> It is to be noted from the paper by Liu and Thorne that the TE noise for the finite and infinite case are not very different. In
fact the correction factor goes as O(1). Thus, differences between finite and inifinte cases are unlikely to be prominent
in the log scale plots

 

 The codes are put as a zip file. Corrections made to the codes will be uploaded as a reply.

Jul_23.bmp


 Here is another plot with a mesh size slightly finer than the default Extra fine mesh in COMSOL.

One may notice that the value for the final frequency i.e. 10000Hz is different from the previous plot. 
It maybe that the error for the higher frequencies is a result of the FEA. However, it may also be that
the appropriate boundary conditions required for an infinite model break down at high frequencies.

ELOG V3.1.3-