Prev: Scoping constructs Block, Module, ModuleBlock violate principle
Next: Scoping constructs Block, Module, ModuleBlock violate
From: Frank on 20 Jul 2010 07:55 First I have to apologize if this is too basic for this forum... I have some temperature dependent magnetization data from a FeNi-alloy. The measurement was done from RT up to the Curie temperature T_c of the alloy. I want to compare my data to a Brillouin function with different angular momenta J. Basically I have to solve M/M_0=B_J[(T_c/T)(M/M_0)], with B_J=(2J+1/J)coth[(2J+1/2J)x]-(1/2J)coth[x/2J], where M_0 is the saturation magnetization How do I basically solve this and in parallel fit it to my data? In principle I want to obtain M_0 and T_c. My data consists of M(T). Thank you for your interest and answers, Frank
From: Alexei Boulbitch on 22 Jul 2010 05:39 First I have to apologize if this is too basic for this forum... I have some temperature dependent magnetization data from a FeNi-alloy. The measurement was done from RT up to the Curie temperature T_c of the alloy. I want to compare my data to a Brillouin function with different angular momenta J. Basically I have to solve M/M_0=B_J[(T_c/T)(M/M_0)], with B_J=(2J+1/J)coth[(2J+1/2J)x]-(1/2J)coth[x/2J], where M_0 is the saturation magnetization How do I basically solve this and in parallel fit it to my data? In principle I want to obtain M_0 and T_c. My data consists of M(T). Thank you for your interest and answers, Frank I think, Frank, that I will not make a mistake, if I write that at this site you should better write your functions in the Mathematica notations, so that we copy-paste them into our notebooks. This belongs to a basic politeness. However, let us try it like it is. First of all, your equation looks somewhat strange (compare http://en.wikipedia.org/wiki/Brillouin_function). Your notations are not quite clear. If I get it right in your case x=(T_c/T)(M/M_0), is it? In this case something is wrong with your notations, since your equation MUST have a bifurcation at T=Tc, i.e. Tc/T=1. I made a simple check with J=1 and have got Tc/T=3/2 (note that I used the traditional Brillouin function, different from the one you write). Here Tc/T is the parameter you used in the above equation and thus, Tc is not the Curie temperature, but your notation. The relation Tc/T=3/2 must be the one for determination the Curie temperature T=2Tc/3. If you were right however, it would give T=Tc. So, there is a mistake in your formulation and you should first fix it. Second, equation you are looking at is very well known, and it is well-known that it has no analytic solution, like M=M(J,T,M0). In contrast, the problem of finding the bifurcation point, Tc, HAS the analytic solution. It enables one to establish the Curie point, Tc=Tc(J). You may find details in a number of popular textbooks on magnetism, and it is your task to read them, not of this community. As soon as you have this solution, you get the experimental Tc value, Tc(exp) from your experimental data, and write down the equation Tc(J)=Tc(exp). This gives you J value. You cannot get more from the combination of this equation and the experimental data, since like this you already fix all available parameters, and the theory you are using offers you no degree of freedom more to play with. I do not understand, why do you need to go beyond this simple procedure and take troubles to make fitting etc. However, if you have a strong reason, this problem may be approached from several directions. First, one can try to solve equation numerically. It is only possible, if parameters (such as Tc/T and J) have some fixed numerical values. Then FindRoot is the operator that will make the job for you. In principle, you may try to think about a routine that will scan the parameter space, numerically retrieve the theoretical dependence and compare it with your experimental data. In this case it is up to you, what routine to write. It depends upon details of your problem, and after all, it is your problem. Second, one may think of what I call a "semi-analytic" solution. In this case you start with separating out a region in the space of parameters (i.e., J, Tc/T), where you can expect them to take values. Then you take a set of points (e.g. a lattice) within this region and solve your equation numerically in each point of this lattice. You further, look for an analytic function, M/M0=f[J, Tc/T,a,b,...], (where a, b,... are some fitting parameters) which would approximate your numeric solution. This function is a product of your guess, and should be as simple as compatible with the precision level you require. For example, it could be a polynomial. The function f[J,Tc/T,a,b...] should be fitted to your numeric solutions. On this step the fitting parameters are a, b,..., rather than J, and thus, a, b,... will be fixed. For the purposes of fitting you may use Fit and/or FindFit operations. There is also a couple of other fitting operators that you could use in complex cases. After the first fitting procedure is finished you have an analytical function, f[J,Tc/T], approximating your theoretical results. Now you may fit this analytical function to your experimental data using J as the fitting parameter. You may again use Fit and/or FindFit for this purpose. It is this approach that I would chose myself, if I need to attack this problem. Third, one can try some analytic approximation to the solution, say asymptotic expansion. This is again up to you, which approximation to choose. As soon as you have such an approximation, you may again use Fit and/or FindFit to make fitting of the analytic function in hand to your experimental data. In any case you should familiarize yourself with Mathematica first. This pays off. Finally, let me make a guess: since the theory you used is much too rough, the solution far from the Curie point will badly (if at all) fit to experiment, independently of the approach you choose, or the Curie point got from the fitting function will be away from the experimental one. Alexei -- Alexei Boulbitch, Dr. habil. Senior Scientist Material Development IEE S.A. ZAE Weiergewan 11, rue Edmond Reuter L-5326 CONTERN Luxembourg Tel: +352 2454 2566 Fax: +352 2454 3566 Mobile: +49 (0) 151 52 40 66 44 e-mail: alexei.boulbitch(a)iee.lu www.iee.lu -- This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.
From: Themis Matsoukas on 22 Jul 2010 05:43 Your question is ambiguous: 1. Are you using regular math notation, or Mathematica notation? It appears you are using both, which makes it difficult to decipher the meaning of (), [], B_J. 2. Did you mean to say B_J[x]=... ? 3. Is J a known constant, or an unknown to be obtained from the fit? Themis > First I have to apologize if this is too basic for > this forum... I have some temperature dependent > magnetization data from a FeNi-alloy. The measurement > was done from RT up to the Curie temperature T_c of > the alloy. I want to compare my data to a Brillouin > function with different angular momenta J. Basically > I have to solve > > M/M_0=B_J[(T_c/T)(M/M_0)], > with > B_J=(2J+1/J)coth[(2J+1/2J)x]-(1/2J)coth[x/2J], > where > M_0 is the saturation magnetization > > How do I basically solve this and in parallel fit it > to my data? In principle I want to obtain M_0 and > T_c. My data consists of M(T). > > Thank you for your interest and answers, > Frank >
From: George Woodrow III on 23 Jul 2010 07:08 You also do not want to use underscores in your variable names. The underscore has a special reserved meaning, which is explained in the fine documentation. Basically, it indicates that the preceding symbol is the pattern to be matched. george On Jul 22, 2010, at 5:43 AM, Themis Matsoukas wrote: > Your question is ambiguous: > > 1. Are you using regular math notation, or Mathematica notation? It appears you are using both, which makes it difficult to decipher the meaning of (), [], B_J. > > 2. Did you mean to say B_J[x]=... ? > > 3. Is J a known constant, or an unknown to be obtained from the fit? > > Themis > >> First I have to apologize if this is too basic for >> this forum... I have some temperature dependent >> magnetization data from a FeNi-alloy. The measurement >> was done from RT up to the Curie temperature T_c of >> the alloy. I want to compare my data to a Brillouin >> function with different angular momenta J. Basically >> I have to solve >> >> M/M_0=B_J[(T_c/T)(M/M_0)], >> with >> B_J=(2J+1/J)coth[(2J+1/2J)x]-(1/2J)coth[x/2J], >> where >> M_0 is the saturation magnetization >> >> How do I basically solve this and in parallel fit it >> to my data? In principle I want to obtain M_0 and >> T_c. My data consists of M(T). >> >> Thank you for your interest and answers, >> Frank >> >
From: DrHasenbein on 3 Aug 2010 06:38
On 22 Jul., 11:39, Alexei Boulbitch <alexei.boulbi...(a)iee.lu> wrote: > First I have to apologize if this is too basic for this forum... I have some temperature dependent magnetization data from a FeNi-alloy. The measurement was done from RT up to the Curie temperature T_c of the alloy. I want to compare my data to aBrillouinfunction with different angular momenta J. Basically I have to solve > > M/M_0=B_J[(T_c/T)(M/M_0)], > with > B_J=(2J+1/J)coth[(2J+1/2J)x]-(1/2J)coth[x/2J], > where > M_0 is the saturation magnetization > > How do I basically solve this and in parallel fit it to my data? In principle I want to obtain M_0 and T_c. My data consists of M(T). > > Thank you for your interest and answers, > Frank > > I think, Frank, that I will not make a mistake, if I write that at this site you should better write your functions in > the Mathematica notations, so that we copy-paste them into our notebooks. This belongs to a basic politeness. However, > let us try it like it is. > > First of all, your equation looks somewhat strange (comparehttp://en.wikipedia.org/wiki/Brillouin_function). > Your notations are not quite clear. If I get it right in your case > > x=(T_c/T)(M/M_0), is it? > > In this case something is wrong with your notations, since your equation MUST have a bifurcation at T=Tc, i.e. Tc/T=1. > I made a simple check with J=1 and have got Tc/T=3/2 (note that I used the traditionalBrillouinfunction, different > from the one you write). Here Tc/T is the parameter you used in the above equation and thus, > Tc is not the Curie temperature, but your notation. The relation Tc/T=3/2 must be the one for determination the Curie > temperature T=2Tc/3. If you were right however, it would give T=Tc. So, there is a mistake in your formulation and > you should first fix it. > > Second, equation you are looking at is very well known, and it is well-known that it has no analytic solution, like M=M(J,T,M0). > In contrast, the problem of finding the bifurcation point, Tc, HAS the analytic solution. > It enables one to establish the Curie point, Tc=Tc(J). You may find details in a number of popular textbooks on magnetism, > and it is your task to read them, not of this community. > As soon as you have this solution, you get the experimental Tc value, Tc(exp) from your experimental data, and write down > the equation Tc(J)=Tc(exp). This gives you J value. You cannot get more from the combination of this equation and the > experimental data, since like this you already fix all available parameters, and the theory you are using offers you > no degree of freedom more to play with. > > I do not understand, why do you need to go beyond this simple procedure and take troubles to make fitting etc. However, > if you have a strong reason, this problem may be approached from several directions. > > First, one can try to solve equation numerically. It is only possible, if parameters > (such as Tc/T and J) have some fixed numerical values. Then FindRoot is the operator > that will make the job for you. In principle, you may try to think about a routine that will scan > the parameter space, numerically retrieve the theoretical dependence and compare it with your experimental data. > In this case it is up to you, what routine to write. It depends upon details of your problem, > and after all, it is your problem. > > Second, one may think of what I call a "semi-analytic" solution. In this case you start with separating out > a region in the space of parameters (i.e., J, Tc/T), where you can expect them to take values. Then you take > a set of points (e.g. a lattice) within this region and solve your equation numerically in each point of this lattice. > You further, look for an analytic function, M/M0=f[J, Tc/T,a,b,...], (where a, b,... are some fitting parameters) which > would approximate your numeric solution. This function is a product of your guess, and should be as simple as compatible > with the precision level you require. For example, it could be a polynomial. The function f[J,Tc/T,a,b...] > should be fitted to your numeric solutions. On this step the fitting parameters are a, b,..., rather than J, and thus, > a, b,... will be fixed. For the purposes of fitting you may use Fit and/or FindFit operations. There is also a couple of > other fitting operators that you could use in complex cases. > After the first fitting procedure is finished you have an analytical function, f[J,Tc/T], approximating your theoretical > results. Now you may fit this analytical function to your experimental data using J as the fitting parameter. > You may again use Fit and/or FindFit for this purpose. It is this approach that I would chose myself, if I need to > attack this problem. > > Third, one can try some analytic approximation to the solution, say asymptotic expansion. This is again up to you, > which approximation to choose. As soon as you have such an approximation, you may again use Fit and/or FindFit to > make fitting of the analytic function in hand to your experimental data. > > In any case you should familiarize yourself with Mathematica first. This pays off. > > Finally, let me make a guess: since the theory you used is much too rough, the solution far from the Curie point will > badly (if at all) fit to experiment, independently of the approach you choose, or the Curie point got from the fitting > function will be away from the experimental one. > > Alexei > > -- > Alexei Boulbitch, Dr. habil. > Senior Scientist > Material Development > > IEE S.A. > ZAE Weiergewan > 11, rue Edmond Reuter > L-5326 CONTERN > Luxembourg > > Tel: +352 2454 2566 > Fax: +352 2454 3566 > Mobile: +49 (0) 151 52 40 66 44 > > e-mail: alexei.boulbi...(a)iee.lu > > www.iee.lu > > -- > > This e-mail may contain trade secrets or privileged, undisclosed or > otherwise confidential information. If you are not the intended > recipient and have received this e-mail in error, you are hereby > notified that any review, copying or distribution of it is strictly > prohibited. Please inform us immediately and destroy the original > transmittal from your system. Thank you for your co-operation. First of all thanks for your explicit answer. I must be honest that I did forget to check back here for answers. I also had some trouble with how to use this group etc... And yes, I am still starting to use Mathematica, but as usual one wants to take too many steps at a time. Sincerely, Frank |