Changeset 661 for branches/maintenance/2.2.2
- Timestamp:
- 10/10/07 15:35:53 (12 months ago)
- Location:
- branches/maintenance/2.2.2/Modelica
- Files:
-
- 2 modified
-
Electrical/Analog/Ideal.mo (modified) (5 diffs)
-
Thermal/FluidHeatFlow.mo (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/maintenance/2.2.2/Modelica/Electrical/Analog/Ideal.mo
r660 r661 871 871 872 872 model IdealOpAmpLimited "Ideal operational amplifier with limitation" 873 873 874 annotation ( 874 875 Documentation(info="<HTML> … … 958 959 SI.Voltage vin "input voltage"; 959 960 protected 960 Real s "Auxiliary variable";961 Real s(unit="1") "Auxiliary variable"; 961 962 constant Real unitVoltage(unit="V") = 1 annotation(Hide=true); 962 963 equation … … 966 967 VMin.i = 0; 967 968 vin = in_p.v - in_n.v; 968 in_p.v - in_n.v = if (s < -1) then s + 1 else if (s > 1) then s - 1 else 0;969 in_p.v - in_n.v = unitVoltage*(if (s < -1) then s + 1 else if (s > 1) then s - 1 else 0); 969 970 out.v = if (s < -1) then VMin.v else if (s > 1) then VMax.v else (VMax.v - 970 971 VMin.v)*s/2 + (VMax.v + VMin.v)/2; … … 981 982 "Forward threshold voltage"; 982 983 Boolean off(start=true) "Switching state"; 983 protected984 Real s985 "Auxiliary variable: if on then current, if opened then voltage";986 984 annotation ( 987 985 Documentation(info="<html> … … 1095 1093 height=0.6)); 1096 1094 1095 protected 1096 Real s 1097 "Auxiliary variable: if on then current, if opened then voltage"; 1098 constant Real unitVoltPerOhm(unit="V/Ohm") = 1 annotation(Hide=true); 1099 constant Real unitAmperePerSiemens(unit="A/S") = 1 annotation(Hide=true); 1097 1100 equation 1098 1101 off = s < 0; 1099 v = s*(if off then 1 else Ron) + Vknee;1100 i = s*(if off then Goff else 1) + Goff*Vknee;1102 v = (s*unitVoltPerOhm)*(if off then 1 else Ron) + Vknee; 1103 i = (s*unitAmperePerSiemens)*(if off then Goff else 1) + Goff*Vknee; 1101 1104 end IdealDiode; 1102 1105 -
branches/maintenance/2.2.2/Modelica/Thermal/FluidHeatFlow.mo
r656 r661 1 1 within Modelica.Thermal; 2 2 3 3 4 package FluidHeatFlow … … 1393 1394 "Part of friction losses fed to medium"; 1394 1395 protected 1396 constant Modelica.SIunits.VolumeFlowRate unitVolumeFlowRate = 1; 1395 1397 constant Real small = Modelica.Constants.small; 1396 constant Modelica.SIunits.VolumeFlowRate smallVolumeFlowRate = eps ;1398 constant Modelica.SIunits.VolumeFlowRate smallVolumeFlowRate = eps*unitVolumeFlowRate; 1397 1399 constant Real eps = Modelica.Constants.eps; 1398 1400 Real yLim = max(min(y,y1),0) "Limited valve opening";
