The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Non-linear curve fit with multiple intermed. Param
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

einheitskreis

Switzerland
2 Posts

Posted - 08/17/2017 :  10:22:43 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello

I would like to implement a curve fit that I've been using with another software into Origin. I'm not proficient in programming, so "Equations mode" seems to me like the best way to do it. I have the independent variable TEMP, the dependent variable CD and the parameter H,DEU,REFU,DEN,REFN,TM. The intermediary variables are K,P,U,F,V,CDU,CDN.

The input for the other program (Scientist 3.0) were as follows:

// Model two state
IndVars: TEMP
DepVars: F, CD, K
Params: H, DEU, REFU, DEN, REFN, Tm

K=EXP(H/(8.31*(TEMP+273.15))*((TEMP+273.15)/(Tm+273.15)-1)-ln(0.75*0.0002^2))

P=1/(3*K*(0.0002^2))

U=(-P/2+(P^2/4+P^3/27)^(1/2))^(1/3)
V=-(P/2+(P^2/4+P^3/27)^(1/2))^(1/3)
F= U+V+1

CDU=REFU+DEU*(TEMP+273.15)
CDN=REFN+DEN*(TEMP+273.15)
CD=F*(CDN-CDU)+CDU

I don't know how to define the variable K, the output when trying to compile is: "CD = -- (Undefined variable: K)"

I would be really happy if someone can help me with this.

Best regards

-

arstern

USA
237 Posts

Posted - 08/17/2017 :  11:21:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Because you have multiple equations to solve for CD, I selected the Equations option under Function type.

Below is how I setup the variables/parameters according to your post.


I then input all equations into the Function Body.


Here is a link for more information on setting up nonlinear fitting functions in Origin.
http://www.originlab.com/doc/Origin-Help/Nonlinear-Curve-Fit

Thanks
Aviel
OrginLab
Go to Top of Page

einheitskreis

Switzerland
2 Posts

Posted - 08/17/2017 :  11:45:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much, it worked
I think the problem was that I wanted to also include the variables F and K in the definition window.

Thanks again for the fantastic support



-
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000