00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef QCBEC_H
00028 #define QCBEC_H
00029
00030 #include "qcquantumsystem.h"
00031 #include "qccomplexfield.h"
00032 #include "qcphase.h"
00033
00039 template <int rank>
00040 class QCBEC : public QCQuantumSystem<complexType,rank>
00041 {
00042 public:
00043
00049 QCBEC(void);
00053 ~QCBEC(void);
00055
00056
00062 void setTrapFrequency(parameterType omegaValue)
00063 { this->SystemParameters.setParameter(0,omegaValue); }
00067 void setChemicalPotential(parameterType chemValue)
00068 { this->SystemParameters.setParameter(1,chemValue); }
00072 void setSelfInteraction(parameterType gValue)
00073 { this->SystemParameters.setParameter(2,gValue); }
00077 void setHBar(parameterType hbarValue)
00078 { this->SystemParameters.setParameter(3,hbarValue); }
00082 void setMass(parameterType massValue)
00083 { this->SystemParameters.setParameter(4,massValue); }
00087 void setAngularFrequency(parameterType bigOmegaValue)
00088 { this->SystemParameters.setParameter(5,bigOmegaValue); }
00092 void setWindingNumber(parameterType nValue)
00093 { this->SystemParameters.setParameter(6,nValue); }
00097 void setDisturbance(parameterType height, int position, int width);
00099
00100
00106 parameterType getTrapFrequency()
00107 { return this->SystemParameters.getParameter(0); }
00111 parameterType getChemicalPotential()
00112 { return this->SystemParameters.getParameter(1); }
00116 parameterType getSelfInteraction()
00117 { return this->SystemParameters.getParameter(2); }
00121 parameterType getHBar()
00122 { return this->SystemParameters.getParameter(3); }
00126 parameterType getMass()
00127 { return this->SystemParameters.getParameter(4); }
00131 parameterType getAngularFrequency()
00132 { return this->SystemParameters.getParameter(5); }
00136 parameterType getWindingNumber()
00137 { return this->SystemParameters.getParameter(5); }
00141 void getDisturbance(parameterType &height, int &position, int &width);
00143
00144
00150 virtual void windPhase()
00151 { Phase.applyVortex(OrderParameter,this->deltaX,this->deltaY,this->xOffset,this->yOffset); }
00155 virtual void constantPhase()
00156 { Phase.applyUniform(OrderParameter,this->deltaX,this->deltaY,this->xOffset,this->yOffset); }
00160 virtual void randomPhase()
00161 { Phase.applyRandom(OrderParameter,this->deltaX,this->deltaY,this->xOffset,this->yOffset); }
00165 virtual void applyPhaseDisturbance()
00166 { Phase.applyDisturbanceTypeII(OrderParameter,this->deltaX,this->deltaY,this->xOffset,this->yOffset); }
00171 virtual void evolve(bool forwards);
00175 virtual void setupConstant();
00179 virtual void setupSteadyState();
00183 virtual void setupVortexSteadyState();
00187 virtual void setupSteadyStateGS();
00191 virtual void setupSteadyStateFSI();
00195 virtual void writeResults();
00197
00198 protected:
00199 QCPhase Phase;
00200 QCComplexField<rank> OrderParameter;
00202 };
00203
00204 #endif // QCBEC_H
00205
00206 template <int rank>
00207 QCBEC<rank>::QCBEC()
00208 {
00209 this->ptrField = &OrderParameter;
00210 this->SystemParameters.setNoOfParameters(7);
00211 }
00212
00213 template <int rank>
00214 QCBEC<rank>::~QCBEC()
00215 {
00216
00217 }
00218
00219 template <int rank>
00220 void QCBEC<rank>::setDisturbance(parameterType height, int position, int width)
00221 {
00222 Phase.setDisturbHeight(height);
00223 Phase.setDisturbPosition(position);
00224 Phase.setDisturbWidth(width);
00225 }
00226
00227 template <int rank>
00228 void QCBEC<rank>::getDisturbance(parameterType &height, int &position, int &width)
00229 {
00230 height = Phase.getDisturbHeight();
00231 position = Phase.getDisturbPosition();
00232 width = Phase.getDisturbWidth();
00233 }
00234
00235 template <int rank>
00236 void QCBEC<rank>::evolve(bool forwards)
00237 {
00238 this->Evolve.evolveForwards(forwards);
00239 this->Evolve.usingTDGP(OrderParameter,this->xOffset,this->yOffset,this->deltaX,this->deltaY,this->SystemParameters);
00240 }
00241
00242 template <int rank>
00243 void QCBEC<rank>::setupConstant()
00244 {
00245 this->SteadyState.setConstant(OrderParameter);
00246 }
00247
00248 template <int rank>
00249 void QCBEC<rank>::setupSteadyState()
00250 {
00251 this->SteadyState.usingTDGPFixedPoint(OrderParameter,this->deltaR,this->SystemParameters);
00252 this->SteadyState.transferSolutionTo(OrderParameter,this->xOffset,this->yOffset,this->deltaX,this->deltaY,this->deltaR);
00253 this->SteadyState.output1DSolution("Radial.csv",this->deltaR);
00254 }
00255
00256 template <int rank>
00257 void QCBEC<rank>::setupVortexSteadyState()
00258 {
00259 this->SteadyState.usingTDGPVortexFixedPoint(OrderParameter,this->deltaR,this->SystemParameters);
00260 this->SteadyState.transferSolutionTo(OrderParameter,this->xOffset,this->yOffset,this->deltaX,this->deltaY,this->deltaR);
00261 this->SteadyState.output1DSolution("Radial.csv",this->deltaR);
00262 }
00263
00264 template <int rank>
00265 void QCBEC<rank>::setupSteadyStateFSI()
00266 {
00267
00268
00269
00270 }
00271
00272 template <int rank>
00273 void QCBEC<rank>::setupSteadyStateGS()
00274 {
00275
00276 }
00277
00278 template <int rank>
00279 void QCBEC<rank>::writeResults()
00280 {
00281 OrderParameter.writeNormToFile("FinalNorm.csv");
00282 Phase.outputPhaseFunction(OrderParameter,"FinalPhase.csv");
00283 }