Rev | Line | |
---|
[801] | 1 | // Dominique YVON, CEA/DAPNIA/SPP 02/2000
|
---|
| 2 |
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 | #include <stdlib.h>
|
---|
| 5 | #include <math.h>
|
---|
| 6 | #ifdef __MWERKS__
|
---|
[1148] | 7 |
|
---|
[801] | 8 | // #include "unixmac.h"
|
---|
| 9 | #endif
|
---|
| 10 | #include "strutil.h"
|
---|
| 11 | #include "quasiptsources.h"
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | QuasiPtSources::QuasiPtSources(double tempe,double angsiz,double theta,double phi)
|
---|
| 16 | :AngSize(angsiz),MyTheta(theta),MyPhi(phi),SurfaceTemperature(tempe)
|
---|
| 17 | {
|
---|
| 18 | QPtSource="true";
|
---|
| 19 | resolution=angsiz/1.5;
|
---|
| 20 | h_kT=6.62e-34/1.38e-23/SurfaceTemperature; // Dimension 1/Hz
|
---|
| 21 | Prefac=8*M_PI*6.626e-34/9.e16; // 8*Pi*h/c2 == J m-2 st-1 hz-3
|
---|
| 22 | // Ou W m-2 st-1 Hz-4
|
---|
| 23 | CosAngSize=cos(AngSize);
|
---|
| 24 |
|
---|
| 25 | pVSource= new UnitVector(MyTheta,MyPhi);
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | QuasiPtSources::~QuasiPtSources(){
|
---|
| 29 | delete pVSource;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | void QuasiPtSources::SetSourceCoor(double theta,double phi){
|
---|
| 33 | delete pVSource;
|
---|
| 34 | MyTheta=theta;
|
---|
| 35 | MyPhi=phi;
|
---|
| 36 | pVSource= new UnitVector(MyTheta,MyPhi);
|
---|
| 37 | return;
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | UnitVector QuasiPtSources::GetVSrcCenter()
|
---|
| 41 | { return *pVSource;
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | double QuasiPtSources::DeltaT(double theta,double phi) {
|
---|
| 45 | // sans dimensions ici
|
---|
| 46 | UnitVector Vec(theta,phi);
|
---|
| 47 | double test1= Vec*GetVSrcCenter();
|
---|
| 48 | if(test1>CosAngSize) return 1.;
|
---|
| 49 | else return 0;
|
---|
| 50 | }
|
---|
| 51 |
|
---|
| 52 | double QuasiPtSources::spectre(double freq){
|
---|
| 53 | // sans dimentions? Oui si on imagine que freq est en Hz!!
|
---|
| 54 | // en Fait Hz^3
|
---|
| 55 | double returnval=freq*freq*freq/(exp(h_kT*freq)-1.);
|
---|
| 56 | return returnval;
|
---|
| 57 | }
|
---|
| 58 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.