Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

User Defined Shear Dependent Viscosity

Please login with a confirmed email address before reporting spam

The below post is related to an archived discussion


I came across the exact same problem as mentioned in the linked threat. I am trying to define a dynamic viscosity based on the temperature / shear rate. However, I see no way of using the shear rate as an argument without using a predefined non-newtonian model. I have defined an analytical function Mu(T,spf.sr) within my material.

Can someone help me?

Update, I get the following error: - Feature: Time-Dependent Solver 1 (sol2/t1) Failed to find consistent initial values. Error in user-defined function. Function: comp1.mat1.def.Mu Failed to evaluate variable. Variable: comp1.mat1.def.mu, Defined as: unit s cf(unit Pa cfcomp1.mat1.def.Mu(comp1.T/unit K cf,unit s cfcomp1.spf.sr)) Failed to evaluate variable. Variable: comp1.spf.mumat, Defined as: comp1.mat1.def.mu Failed to evaluate variable. Variable: comp1.spf.mu, Defined as: comp1.spf.mumat Failed to evaluate variable. Variable: comp1.spf.mu eff, Defined as: comp1.spf.mu Failed to evaluate variable. Variable: comp1.spf.K stress tensorrr, Defined as: comp1.ur(2comp1.spf.mu eff) Failed to evaluate expression. Expression: d((2((comp1.p-comp1.spf.K stress tensorrr)test(comp1.ur)-comp1.spf.K stress tensorrztest(comp1.uz)+(comp1.p-comp1.spf.K stress tensorphiphi)if(abs(r)<0.001h spatial,test(comp1.ur),test(comp1.u)/r)-comp1.spf.K stress tensorzrtest(comp1.wr)+(comp1.p-comp1.spf.K stress tensorzz)test(comp1.wz))pir)(dvol spatial),{test10}) Failed to evaluate Jacobian of expression. Expression: (2((comp1.p-comp1.spf.K stress tensorrr)test(comp1.ur)-comp1.spf.K stress tensorrztest(comp1.uz)+(comp1.p-comp1.spf.K stress tensorphiphi)if(abs(r)<0.001h spatial,test(comp1.ur),test(comp1.u)/r)-comp1.spf.K stress tensorzrtest(comp1.wr)+(comp1.p-comp1.spf.K stress tensorzz)test(comp1.wz))pir)*(dvol spatial) Last time step is not converged.


1 Reply Last Post 2018年12月20日 GMT-5 14:48

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 2018年12月20日 GMT-5 14:48

You may need to need to add eps to shear rate argrument so that at time zero it has some low of viscoity otherwise it become zero.

You may need to need to add eps to shear rate argrument so that at time zero it has some low of viscoity otherwise it become zero.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.