CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Chip : invalid opcode 0 : pc = 8

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2024, 07:44
Default Chip : invalid opcode 0 : pc = 8
  #1
New Member
 
Matteo
Join Date: May 2024
Posts: 1
Rep Power: 0
Muad-iiib is on a distinguished road
Hello everyone,
I am currently trying to simulate blood flow through a tubular sudden expansion channel. For this a two-fluid model is applied, where the plasma is treated as a Newtonian fluid and the RBCs are treated as shear-thinning fluid. In this model, RBCs have a non-constant viscosity which needs to be implemented through a UDF.

Here is the C++ code I am using :

#include "udf.h"

real mu_inf;
real mu_0;
real mu;
real L[3][3];
real gamma;

DEFINE_PROPERTY(viscosity, c, t)
{
real phi = C_VOF(c, t);
mu_inf = 27.87 * phi * phi * phi - 21.22 * phi * phi + 14.44 * phi;
mu_0 = 537 * phi * phi * phi + 55.01 * phi * phi - 0.13 * phi;

L[0][0] = C_DUDX(c, t);
L[0][1] = C_DUDY(c, t);
L[0][2] = C_DUDZ(c, t);
L[1][0] = C_DVDX(c, t);
L[1][1] = C_DVDY(c, t);
L[1][2] = C_DVDZ(c, t);
L[2][0] = C_DWDX(c, t);
L[2][1] = C_DWDY(c, t);
L[2][2] = C_DWDZ(c, t);

gamma = sqrt(0.5*(4*L[0][0]*L[0][0]+4*L[1][1]*L[1][1]+4*L[2][2]*L[2][2]+2*(L[0][1]+L[1][0])*(L[0][1]+L[1][0])+2*(L[0][2]+L[2][0])*(L[0][2]+L[2][0])+2*(L[1][2]+L[2][1])*(L[1][2]+L[2][1])));
mu = mu_inf + (mu_0 - mu_inf) * (1 + log(1 + 11 * gamma)) / (1 + 11 * gamma);
return mu;
}

Gamma stands for the shear rate, mu the viscosity, phi the volume fraction and L the velocity gradient matrix.

The code doesn't send any error message when compiled on fluent however when initialising the simulation and after every iteration, I get several lines of this message : "Chip : invalid opcode 0 : pc = 8". The simulation doesn't stop though and continues until the end.

Could anyone explain to me what this mean and how it impacts the result of the simulation ?

Thanks for your help !
Muad-iiib is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Invalid Normals for source face to target face while making AMI? Sorabh OpenFOAM Meshing & Mesh Conversion 1 August 3, 2021 07:35
[OpenFOAM] ParaView command in Foam-extend-4.1 mitu_94 ParaView 0 March 4, 2021 14:46
parallel simulations - error message: "OPT_ITERATIONS: invalid option name" v8areu SU2 5 July 23, 2015 03:57
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 16:46
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37


All times are GMT -4. The time now is 12:10.