شبیه سازی برج تقطیر با معادلات غیرخطی در MATLAB

پیرجو

مدیر ارشد
مدیر کل سایت
مدیر ارشد
شبیه سازی برج تقطیر با معادلات غیرخطی در MATLAB

کد:
Model {
  Name			  "colas_nonlin"
  Version		  2.09
  SimParamPage		  Solver
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  on
  ShowLineWidths	  off
  PaperOrientation	  landscape
  PaperType		  usletter
  PaperUnits		  inches
  StartTime		  "0.0"
  StopTime		  "50"
  Solver		  ode45
  RelTol		  "1e-5"
  AbsTol		  "1e-5"
  Refine		  "1"
  MaxStep		  "1"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  RefineOutputTimes
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  off
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  LimitMaxRows		  off
  MaxRows		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  warning
  MinStepSizeMsg	  warning
  UnconnectedInputMsg	  warning
  UnconnectedOutputMsg	  warning
  UnconnectedLineMsg	  warning
  ConsistencyChecking	  off
  ZeroCross		  on
  SimulationMode	  normal
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_unix.tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  BlockDefaults {
    Orientation		    right
    ForegroundColor	    black
    BackgroundColor	    white
    DropShadow		    off
    NamePlacement	    normal
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    normal
    FontAngle		    normal
    ShowName		    on
  }
  AnnotationDefaults {
    HorizontalAlignment	    center
    VerticalAlignment	    middle
    ForegroundColor	    black
    BackgroundColor	    white
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    normal
    FontAngle		    normal
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    normal
    FontAngle		    normal
  }
  System {
    Name		    "colas_nonlin"
    Location		    [303, 71, 1011, 435]
    Open		    on
    ScreenColor		    white
    Block {
      BlockType		      Constant
      Name		      "B"
      Position		      [75, 220, 130, 240]
      Value		      "0.5"
    }
    Block {
      BlockType		      Clock
      Name		      "Clock"
      Position		      [85, 10, 105, 30]
      Location		      [30, 40, 140, 75]
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "Comp."
      Position		      [495, 237, 545, 253]
      VariableName	      "Comp"
      Buffer		      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Constant
      Name		      "D"
      Position		      [75, 185, 130, 205]
      Value		      "0.5"
    }
    Block {
      BlockType		      Demux
      Name		      "Demux"
      Ports		      [1, 5, 0, 0, 0]
      Position		      [380, 116, 435, 184]
      Outputs		      "[1,1,1,1,41]"
    }
    Block {
      BlockType		      S-Function
      Name		      "Distillation\ncolumn\n(nonlinear)"
      Ports		      [1, 1, 0, 0, 0]
      Position		      [290, 117, 360, 183]
      FunctionName	      "colas"
    }
    Block {
      BlockType		      Constant
      Name		      "F"
      Position		      [179, 65, 211, 80]
      Orientation	      down
      Value		      "1.01"
    }
    Block {
      BlockType		      Scope
      Name		      "Graph"
      Ports		      [1, 0, 0, 0, 0]
      Position		      [575, 76, 605, 114]
      Floating		      off
      Location		      [188, 365, 512, 604]
      Open		      off
      Grid		      on
      TickLabels	      on
      ZoomMode		      on
      TimeRange		      "50"
      YMin		      "0.98"
      YMax		      "1"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitMaxRows	      on
      MaxRows		      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "0"
    }
    Block {
      BlockType		      Constant
      Name		      "L"
      Position		      [75, 110, 130, 130]
      Value		      "2.7063"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "M_B"
      Position		      [495, 202, 545, 218]
      VariableName	      "y4"
      Buffer		      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "M_D"
      Position		      [495, 172, 545, 188]
      VariableName	      "y3"
      Buffer		      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [7, 1, 0, 0, 0]
      Position		      [230, 116, 270, 184]
      Inputs		      "7"
    }
    Block {
      BlockType		      Constant
      Name		      "V"
      Position		      [75, 150, 130, 170]
      Value		      "3.2063"
    }
    Block {
      BlockType		      Constant
      Name		      "qF"
      Position		      [229, 65, 261, 80]
      Orientation	      down
      Value		      "1"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "time"
      Position		      [485, 12, 535, 28]
      VariableName	      "t"
      Buffer		      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "x_B"
      Position		      [495, 142, 545, 158]
      VariableName	      "y2"
      Buffer		      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      ToWorkspace
      Name		      "y_D"
      Position		      [495, 112, 545, 128]
      VariableName	      "y1"
      Buffer		      "1000"
      Decimation	      "1"
      SampleTime	      "0"
    }
    Block {
      BlockType		      Constant
      Name		      "zF"
      Position		      [122, 65, 148, 80]
      Orientation	      down
      Value		      "0.5"
    }
    Line {
      SrcBlock		      "qF"
      SrcPort		      1
      Points		      [0, 20; -40, 0; 0, 75]
      DstBlock		      "Mux"
      DstPort		      7
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      1
      Points		      [0, 0]
      Branch {
	Points			[0, -25]
	DstBlock		"Graph"
	DstPort			1
      }
      Branch {
	DstBlock		"y_D"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Distillation\ncolumn\n(nonlinear)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      2
      Points		      [35, 0; 0, 15]
      DstBlock		      "x_B"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Distillation\ncolumn\n(nonlinear)"
      SrcPort		      1
      DstBlock		      "Demux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Clock"
      SrcPort		      1
      DstBlock		      "time"
      DstPort		      1
    }
    Line {
      SrcBlock		      "zF"
      SrcPort		      1
      Points		      [0, 15; 20, 0; 0, 70]
      DstBlock		      "Mux"
      DstPort		      6
    }
    Line {
      SrcBlock		      "V"
      SrcPort		      1
      Points		      [10, 0; 0, -30]
      DstBlock		      "Mux"
      DstPort		      2
    }
    Line {
      SrcBlock		      "F"
      SrcPort		      1
      Points		      [0, 15; -30, 0; 0, 60]
      DstBlock		      "Mux"
      DstPort		      5
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      5
      Points		      [-1, 0; 0, 65]
      DstBlock		      "Comp."
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      4
      Points		      [10, 0; 0, 45]
      DstBlock		      "M_B"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Demux"
      SrcPort		      3
      Points		      [20, 0; 0, 30]
      DstBlock		      "M_D"
      DstPort		      1
    }
    Line {
      SrcBlock		      "B"
      SrcPort		      1
      Points		      [50, 0; 0, -80]
      DstBlock		      "Mux"
      DstPort		      4
    }
    Line {
      SrcBlock		      "D"
      SrcPort		      1
      Points		      [40, 0; 0, -55]
      DstBlock		      "Mux"
      DstPort		      3
    }
    Line {
      SrcBlock		      "L"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      1
    }
  }
}
 

hot849

عضو جدید
salam
in ke kheyli KHAFANE!
man be onvan yek mobtadi che tori in jor chiz ha ra yad beghiram?
bebakhshid fenghlishb shood.
 

پیرجو

مدیر ارشد
مدیر کل سایت
مدیر ارشد
salam
in ke kheyli KHAFANE!
man be onvan yek mobtadi che tori in jor chiz ha ra yad beghiram?
bebakhshid fenghlishb shood.
شما برای یادگیری زبان برنامه نویسی MATLAB سه چیز رو اول باید یاد بگیرید:
1) زبان انگلیسی
2) حل اون معادله ای که قصد دارید برنامش رو بنویسید
3) خود کار با برنامه که برای این کار نیاز به شناخت توابع و آشنایی با اصول برنامه نویسی به دو شیوه
الف) عمومی: بتوانید مثال های ساده عددی مثل معادله درجه سوم و یا بیشتر و حل انتگرال و غیره رو انجام دهید.
ب) تخصصی: برای این کار حتما نیاز به کتاب هایی دارید که در زمینه مهندسی شیمی بسیار زیاد می باشد.
اون موقعه خیلی راحت می توانید محاسبات مربوط به هرگونه برجی حتی برج های 41 سینی به بالاتر رو انجام دهید.
موفق و سربلند باشید.
 
بالا