Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Modelica/Resources/C-Sources/ModelicaMatIO.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
IMPORTANT REMARK: PLEASE IGNORE THIS STUPID REMARK
*/

/* This file was created by concatenation of the following C source files of the
Expand Down
10 changes: 5 additions & 5 deletions Modelica/Thermal/FluidHeatFlow/BaseClasses/SimpleFriction.mo
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ protected
initial algorithm
assert(V_flowNominal>V_flowLaminar,
"SimpleFriction: V_flowNominal has to be > V_flowLaminar!");
assert(dpNominal>=dpNomMin,
"SimpleFriction: dpNominal has to be > dpLaminar/V_flowLaminar*V_flowNominal!");
assert(dpNominal>=dpNomMin*(1 - 100*Modelica.Constants.eps),
"SimpleFriction: dpNominal has to be >= dpLaminar/V_flowLaminar*V_flowNominal!");
k:=(dpNominal - dpNomMin)/(V_flowNominal - V_flowLaminar)^2;
equation
if volumeFlow > +V_flowLaminar then
pressureDrop = +dpLaminar/V_flowLaminar*volumeFlow + k*(volumeFlow - V_flowLaminar)^2;
pressureDrop = +dpLaminar/V_flowLaminar * volumeFlow + k*(volumeFlow - V_flowLaminar)^2;
elseif volumeFlow < -V_flowLaminar then
pressureDrop = +dpLaminar/V_flowLaminar*volumeFlow - k*(volumeFlow + V_flowLaminar)^2;
pressureDrop = +dpLaminar/V_flowLaminar * volumeFlow - k*(volumeFlow + V_flowLaminar)^2;
else
pressureDrop = dpLaminar/V_flowLaminar*volumeFlow;
pressureDrop = dpLaminar/V_flowLaminar * volumeFlow;
end if;
Q_friction = frictionLoss*volumeFlow*pressureDrop;
annotation (Documentation(info="<html>
Expand Down