Overview
Comment:include causality.hh to define effort, flow and state.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 93e154c5139312361a8802881c4af012385a819ac4a1701c1f0c8177974aa96f
User & Date: geraint@users.sourceforge.net on 2004-08-29 17:28:42.000
Other Links: branch diff | manifest | tags
Context
2004-08-29
18:01:46
Reads each CR name input and writes a directive to #include an equivalent
CR.hh from $MTT_LIB/cr/hh.
check-in: 9f2a0a7535 user: geraint@users.sourceforge.net tags: origin/master, trunk
17:28:42
include causality.hh to define effort, flow and state. check-in: 93e154c513 user: geraint@users.sourceforge.net tags: origin/master, trunk
17:27:43
Define effort, flow and state as enum elements. thus allowing
them to be included in CRs without being declared or quoted.
check-in: d392f9d9c1 user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes
1
2
3
4
5

6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
13





+







#ifndef LIN_HH
#define LIN_HH

#include <iostream>

#include "causality.hh"
#include "components.hh"
// translated from lin.cr

// one 2-port, R/C/I; two 2-port, TF/GY
inline double
lin(const component_t	type,
    // parameters
1
2
3
4
5
6

7
8
9
10
11
12
13
1
2
3
4
5
6
7
8
9
10
11
12
13
14






+







#ifndef PRESSUREDROP_HH
#define PRESSUREDROP_HH

#include <cmath>		// fabs, pow
#include <string>

#include "causality.hh"
#include "constants.hh"
#include "frictionfactor.hh"
#include "kinematicviscosity.hh"
#include "sign.hh"

inline double
pressuredrop(const std::string fluid,
1
2
3
4
5


6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
13
14





+
+







#ifndef SQUARELAW_HH
#define SQUARELAW_HH

#include <cmath
#include "sign.hh"

#include "causality.hh"

inline double squarelaw(const double gain,
			const causality_t causality, const int port,
			const double input, const causality_t in_causality, const int in_port)
  /*
   * implements P = R Q^2
   * direction of flow is retained
1
2
3
4
5

6
7
8
9
10
11
12
1
2
3
4
5
6
7
8
9
10
11
12
13





+







#ifndef STATICPRESSURE_HH
#define STATICPRESSURE_HH

#include <cmath>		// log, pow

#include "causality.hh"
#include "constants.hh"

inline double
staticpressure(const double beta,
	       const double C_d,
	       const double d,
	       const double P_ref,

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]