Welcome Message

「流行起於高分子,變化盡藏微宇宙」! 歡迎光臨「流變學好簡單 | The RheoMaster」部落格,成立於 2019/2/22,旨在提供簡單的中文流變學知識,包括高分子流變學、輸送現象、高分子加工、流變量測等。您可至右方進行關鍵字搜尋,若有任何建議,請至文章留言或來信 yuhowen@gmail.com。 Welcome to "The RheoMaster" Blog. This website was established in Feb 2019. In view of the lack of Chinese literature on rheology, here we offer basic knowledge relevant to polymer rheology, transport phenomena, polymer processing, rheometry, etc. If you have any suggestion, please leave a message on the post you are reading or email us at yuhowen@gmail.com.

2019年12月19日

利用 MS Excel 的 Solver 進行曲線擬合 (Curve Fitting Using Excel Solver)

當我們進行數據分析時,常常碰到找最佳參數值的狀況。以下介紹如何利用 Microsoft Excel 內建的 Solver (規劃求解),快速完成黏度曲線擬合。

擬合公式為 Carreau-Yasuda 模型
(1)
此模型有五個參數,分別為 η∞、η0、λ、an,實驗數據如 Fig. 1 的黑色圓點。經使用 Excel Solver 求解後,可以得到 Fig. 1 的紅色曲線 (五個參數的最佳擬合值可見 Fig. 2 之結果)。對細節有興趣者,可參考文件 https://pages.mtu.edu/~fmorriso/cm4650/Using_Solver_in_Excel.pdf。

Figure 1

Figure 2


(註:在啟用規劃求解功能前,需至 Excel 的增益集新增該功能)

2019年12月18日

書籍 - 旋元佑英文字彙

字源大挪移一書由英文魔法師旋元佑所著的字彙書 (4 CDs),約在 10 年前就絕版了,書中以字首、字根、字尾分門別類,有系統地逐一介紹,以幫助記憶 (學單字這樣背就對了!)。

好消息是,在今年年底,該書又重新出版,書名為旋元佑英文字彙。維持原來的風格以字首、字根分類,也拆成通用學術字彙、托福 TPO 字彙兩部分。另一個新增的特色為,針對例句中的搭配詞,作者使用底線標註,方便讀者記憶。此書已可於博客來訂購 (另有旋元佑文法書,也是再版),書中的例句 MP3 免費下載網址 https://www.jwbooks.com.tw/DL/。

舊版的封面


舊版的內頁


2019 新版封面

2019年12月17日

書籍 - 朗文英文文法全集

由日本人寫的一本文法書,內容清楚且富含有趣的插圖說明。

Phan-Thien-Tanner (PTT) 黏彈模型預測之單軸拉伸黏度 (PTT Model Response in Elongation)

於單軸拉伸流場 (uniaxial elongational flow),linear- 和 exponeitial-PTT 模型預測之拉伸黏度分別如 Figs. 1、2 所示。由計算結果發現,參數 ε 主要決定應變硬化的程度 (strain hardening)。

當 ε 越小,應變硬化程度越明顯;然而,ξ 對拉伸流場的預測影響不大 (虛線)。因此,ε 主要主導拉伸流的響應,需從拉伸黏度決定之,而 ξ 可從線性黏彈性和剪切黏度數據估計之 
[註: 於剪切流場下,當 ε 越小,剪切致稀發生在越高的剪切速率]


Figure 1 Linear-PTT 模型的之預測 (ε = 0.01, 0.1, 1, 10 and ξ = 0 or 0.1)

Figure 2 Exponential-PTT 模型之預測 (ε = 0.01, 0.1, 1, 10 and ξ = 0 or 0.1)

由 Fig. 6-5 的比較可知,在高拉伸速率下,linear-PTT (1) 預測穩態拉伸黏度達到平台區;反觀,exponential-PTT (2) 則預測拉伸黏度有一最大值。因此,exponential-PTT 較適於描述實驗上觀察到的熔體單軸拉伸黏度數據。


Reference: RG Larson, Constitutive Equations for Polymer Melts and Solutions (Butterworths 1988).

2019年12月15日

Chapter 7 Defining Your Own Date Types

第 7 章基本 C++ 程式碼整理如下

Reference: I Horton, Ivor Horton's Beginning Visual C++ 2013 (Wiley 2014).


7.1 The Struct in C++
∎ Struct

// Struct definition
struct Rectangle
{
    int left;
    int top;
    int right;
    int bottom;
};


7.2 Types, Classes, Objects, and Instances
∎ Class

// Definition of a class
class CBox
{
    public:
        double m_length; // Data members
        double m_width;
        double m_height;
};

∎ Class
// Main.cpp
CBox box1;  // Declare object box1 of type CBox
CBox box2;

if (box1 > box2)  // ">" is an operator acting on the objects

    box1.fill();  // "fill()" is a member function acting on object 1
else
    box2.fill();


7.3 Understanding Classes
∎ Accessing the data members of a class

// Main.cpp
CBox box1;
CBox box2;
box1.m_length = box1.m_width = box1.m_height = 2.0;
box2 = box1;  // Member-wise copying from box1 to box2

∎ Adding a member function to CBox

// Member function
double volume()
{
    return m_length * m_width * m_height;

}


7.4 Class Constructors
∎ Adding a Constructor to the CBox class  

// Constructor definition
CBox(double lv, double wv, double hv)
{
    cout << "Constructor called." << endl;
    m_length = lv;  // Set values of data members
    m_width = wv;
    m_height = hv;
}

∎ Default constructor

// Default constructor definition
CBox()
{
    cout << "Default constructor called." << endl;
}

∎ Constructor initialization list

// Constructor definition
CBox(double lv = 1.0, double wv = 1.0, double hv = 1.0) :
             m_length {lv}, m_width{wv}, m_height{hv}
{
    cout << "Constructor called." << endl;
}

cf. CCandyBox(double lv, double wv, double hv, const char* str = "Candy") :
             : CBox {lv, wv, hv}  // In the inherited class CCandyBox

∎ Making a constructor explicit 

// Make a constructor more specific, instead of generalCBox box;
box = 99.0;
CBox(double side) : m_Length {side}, m_Width {side}, m_Height {side}  {}  // Will compile
explicit CBox(double side)
: m_Length {side}, m_Width {side}, m_Height {side} {}  // Will not, unless CBox box {4.0} is used 



7.5 Private Members of a Class
∎ Private data members

// CBox.h
class CBox
{
    private:
        double m_length;
        double m_width;
        double m_height;
};

// Main.cpp

box1.m_length = 4.0; // Error message: cannot access private data member declared in class CBox

∎ Friend function of a class

// Friend function prototype (in CBox.h) 
friend double boxSurface(const CBox& aBox);

// A function that is not a member of the class, but with special privilege

double boxSurface(const CBox& aBox)
{
    return 2.0 * (aBox.m_length * aBox.m_width + aBox.m_width * aBox.m_height
               + aBox.m_height * aBox.m_length); 
}

∎ Copying information between instances

// Initialize box2 with box1 (done by the default copy constructor)
CBox box2{box1};

// .h

CBox (const CBox& initB);

// .cpp

CBox::CBox(const CBox& initB):
            m_length{initB.m_length}, m_width{initB.m_width}, m_height{initB.m_height}


7.6 The Pointer This
∎ Explicit use of this

// main.cpp
if (cigar.compare(match))
    cout << "cigar is larger than match" << endl;
else
    cout << "cigar is not larger than match" << endl;

// .cpp

bool compare(CBox& aBox)
{
    return this->volume() > aBox.volume();
}



7.7 Const Objects
∎ Constant member functions of a class

// Non-const object
CBox cigar{8.0, 5.0, 1.0};
bool CBox::compare(CBox& aBox)

// const object

const CBox cigar{8.0, 5.0, 1.0};
bool CBox::compare(const CBox& aBox) const

∎ Member function definitions outside the class


7.8 Array of Objects


7.9 Static Members of a Class


∎ Counting instances of a class type (ex7_12)
static int objectCount;  // Count of objects in existence

int CBox:: objectCount{};  // Initialize static data member of CBox class; no keyword "static"


7.10 Pointers and References to Objects


7.11 Summary