I am following the tutorial *3D Bifurcating Artery*, and to create the material blood, which is non-newtonian, the Carreau model is used to model the viscosity. However, **I do not have that option**.

I am using ANSYS R2 2020 Student version.

I **do not want** to write the Carreau model **as an expression**, but

Thanks in advance.

]]>The highlighted part is the Marangoni force term. I understand that the 1st term(the surface tension force term) is modeled as CSF by FLUENT and added by the VOF model itself. I have written the UDF for the 3rd term which is the recoil pressure term.

First I read that FLUENT can add the Marangoni force term arising out of variation in the surface tension due to temperature. This is mentioned in this image.

But then I read in detail in the theory guide and found out that the CSF term is only for a constant surface tension and for the tangential Marangoni force term(arising out due to variation of surface tension), I have to add it myself. What if I have a temperature dependent surface tension coefficient? Both the statements are completely opposite. Can someone clarify please?? I am using Ansys 2020R2

I'm trying to create a UDF which analyses the shear stress gradients (and hence contribution to the X and Y momentum) for steady, compressible turbulent (SA) flow.

This can be done easily by rearranging the navier stokes such that the X term would look like

Grad(P)[0]+ rho(q . nabla)q [0]

where q is velocity. We have all these properties which can be easy to implement in a UDF and visualised using a user defined scalar.

However, I want to do this using the shear stress alone where we have tau xx[0] + tau xy[1] for the X momentum term which should then be equal or close to equal to the other method. However, I have been unsuccessful in doing so, my stress components are given as follows (note some over expansion etc for data analysis purposes). Instead of this longwinded way is there a shear stress variable available or do I need to calculate this. Is there a clear problem with my implementation process?

/*tau_xx*/

C_UDSI(c,t,0) = (-2/3)*(C_MU_L(c,t))*(C_DUDX(c,t) + C_DVDY(c,t)) + 2*(C_MU_L(c,t) + C_MU_T(c,t))*C_DUDX(c,t);

/*tau_xy*/

C_UDSI(c,t,1) = (C_MU_L(c,t) + C_MU_T(c,t))*(C_DVDX(c,t) + C_DUDY(c,t));

/*tau_yy*/

C_UDSI(c,t,2) = (-2/3)*(C_MU_L(c,t))*(C_DUDX(c,t) + C_DVDY(c,t)) + 2*(C_MU_L(c,t) + C_MU_T(c,t))*C_DVDY(c,t);

Thanks.

]]>Thansk a lot.

]]>sqrt(ND_SUM(ND_DOT(C_DUDX(c,t), C_DUDY(c,t), C_DUDZ(c,t),(C_DUDX(c,t) + C_DUDX(c,t)),(C_DUDY(c,t) + C_DVDX(c,t)),(C_DUDZ(c,t) + C_DWDX(c,t))),ND_DOT(C_DVDX(c,t), C_DVDY(c,t), C_DVDZ(c,t),(C_DVDX(c,t) + C_DUDY(c,t)),(C_DVDY(c,t) + C_DVDY(c,t)),(C_DVDZ(c,t) + C_DWDY(c,t))),ND_DOT(C_DWDX(c,t), C_DWDY(c,t), C_DWDZ(c,t), (C_DWDX(c,t) + C_DUDZ(c,t)),(C_DWDY(c,t) + C_DVDZ(c,t)),(C_DWDZ(c,t) + C_DWDZ(c,t))))

+ (rp_axi ? (2.*SQR(C_V(c,t)/C_AVE_Y(c,t)) + (sg_swirl ? (SQR(C_AVE_Y(c,t))*NV_MAG2( C_STORAGE_R_NV(c,t,SV_OMEGA_G))): 0.)): 0.))

I understand the first part of the definition which is basically the second invariant of the strain rate tensor. But for axisymmetric case part(rp_axi part) I don't get how those terms appear. Can anyone explain/refer to any theory resource to learn how those terms appear for axisymmetric case? Also, I can't find definition of the terms too in the manual.

]]>Now, as I understand FLUENT does not create a sharp interface between 2 phases and the volume fraction change takes place over a number of cells. So, I cannot exactly use 0.5 as volume fraction to apply the source terms. I am taking a range of volume fraction for the applying the source terms(0.05<C_VOF<1). Next I understand that I should also use the cell centre z coordinates to identify these cells which have a volume fraction in that range? So, how to know the number of cells at the interface?

Concerning the reference values for a 3D simulation of an airfoil which have a symmetry wall in the middle: the "Reference Length" stays the same but the "Reference Area" should be doubled, right?

The aim is to calculate the cl and cd values.

Thanks for any help!

]]>I am working on multiphase blood simulations in patient-specific aortas using ansys FLUENT (version 19.1). I have succesfully implemented a two-phase model on different geometries, but am struggling with the interpretation of some results.

I model the blood as being non-Newtonian using a modified Carreau-Yasuda model with two phases: plasma + RBC (as a granular phase). The UDF uses the shear rate of the RBCs and RBC volume fraction to calculate the RBC viscosity and this is then implemented in FLUENT under the specific settings for the RBCs in the granular phase. The bulk viscosity is assumed to be zero. The mixture viscosity is then (when post-processing) calculated according to: mu_mix = mu_rbc*VOF_rbc + mu_plasma*VOF_plasma. The plasma viscosity is assumed to be constant.

To compare and verify my results, I did a single phase non-Newtonian simulation with the same UDF, but using a fixed VOF of 0.45 (therefore, the viscosity is only dependent on the strain rate magnitude.

When I compare the mixture viscosities for the single and multiphase model, I encounter lower viscosity magnitude values for the multiphase model. I have trouble finding a reason why this is the case, since (for as far as I know), the strain rate magnitude is only dependent on the velocity of the particles. There are no differences in the velocity contour plots, so I would expect the viscosity contours to be the same as well (at least during steady state). I listed the differences between the simulations below:

1. Single phase has overall plasma viscosity of 0.0037 Pa s, whereas the two-phase has a plasma viscosity of 0.001 Pa s and the RBC viscosity is determined by the UDF.

2. The single phase model has an overall density of 1080 kg/m3 and the two phase model uses 1025 kg/m3 for the plasma + 1125 kg/m3 for the RBCs.

3. Obviously, the two-phase model has the granular euler-euler multiphase approach enabled. Here, RBCs are assumed to be the granular phase with a diameter of 8e-6 m. Granular bulk viscosity is assumed to be zero, only drag is enabled (Gidaspow model).

All other convergence settings are similar, and the results presented below are from converged steady state solutions.

Also, the UDF for 1) the single phase non-Newtonian model:

DEFINE_PROPERTY(cy_viscosity_singlephase, c, t)

{

float mu_plasma = 0.001;

float eps_RBC = 0.45;

float lambda = 0.110;

float n = (0.8092 * pow(eps_RBC,3)) - (0.8246 * pow(eps_RBC,2)) - (0.3503 * eps_RBC) + 1;

float m = (122.28 * pow(eps_RBC,3)) - (51.213 *pow(eps_RBC,3)) + (16.305 * eps_RBC) + 1;

float exp = (n-1)/2;

double gamma;

double mu;

gamma = C_STRAIN_RATE_MAG(c, t);

mu = mu_plasma*m*pow((1+ pow((lambda*gamma),2)),exp);

return mu;

}

And the UDF for the two-phase model:

#include "udf.h"

DEFINE_PROPERTY(granular_viscosity_rbc , cell , thread_rbc)

{

int phase_domain_index , ID=9;

Thread *mixthread;

Thread *subthread;

Domain *mixture_domain;

mixture_domain = Get_Domain(1);

mixthread = Lookup_Thread(mixture_domain ,ID);

/* predefine variables */

real muplasma=0.001;

real murbc;

real mumix;

real eps_rbc;

real lambda=0.110;

real m;

real n;

real sr;

Domain *plasma_domain;

Domain *rbc_domain;

/* get domain numbers of plasma and rbc */

plasma_domain = Get_Domain(2);

rbc_domain = Get_Domain(3);

/* loop over all threads */

sub_thread_loop(subthread , mixthread , phase_domain_index)

{

/* viscosity in plasma thread is muplasma */

if ( subthread == Lookup_Thread(plasma_domain ,ID) )

{

muplasma = C_MU_L(cell , subthread);

}

else if ( subthread == Lookup_Thread(rbc_domain ,ID) )

{

sr = C_STRAIN_RATE_MAG(cell ,subthread); /* shear rate from rbc, could be the

wrong one */

eps_rbc = C_VOF(cell , subthread);

}

}

n = 0.8092*pow(eps_rbc ,3.) - 0.8246*pow(eps_rbc ,2.) - 0.3503*eps_rbc + 1.;

m = 122.28*pow(eps_rbc ,3.) - 51.213*pow(eps_rbc ,2.) + 16.305*eps_rbc + 1.;

mumix = m* pow( (1.+ pow((lambda*sr) ,2.) ),((n-1.)/2.) );

murbc = (mumix*muplasma -(1.-eps_rbc)*muplasma)/eps_rbc;

/*if (cell %50000==0)

{

Message("muplasma = %f\n", muplasma);

Message("strainrate = %f\n",sr);

Message("vof = %f\n",eps_rbc);

Message("n = %f\n",n);

Message("m = %f\n",m);

Message("mumix %f\n",mumix);

Message("murbc %f\n",murbc);

Message(" %f\n",);

}*/

return murbc;

}

Furthermore, I investigated the effect of taking the strain rate magnitude for the two phase model from the plasma phase / from the plasma + rbc phase. However, this gave no different viscosity magntide if deducted from the plasma phase, and if it was deducted from the plasma + rbc phase, the mixture viscosity was even lower (due to the shear thinning effect).

Therefore, I was wondering: what exactly are all the parameters effecting the shear rate magnitude (and this the mixture viscosity) in a multiphase model? Since everything I read / research leads to the conclusion that it's only a function of the velocity field, whereas those are similar for the different simulations.

I included images of the different Velocity Fields + RBC viscosities + mixture viscosities.

Thanks in advance!

I am using the VOF model in Fluent. I am trying to patch a region with an irregular geometrical shape ( neither rectangular, hex nor spherical). How do I do it? The zone is already named and I can patch it as a boundary but not as a region. Let me know if anyone has answers for this.

Thank you!

Maysaa

]]>Is this a way to write this using expressions?

]]>Note- From Literature I was made to understand that for k-omega model avg y plus should be ~1 but due to roughness upto what value of y plus would be acceptable?

Would be grateful if someone provide some insight into it..

]]>I am trying to simulate a transient simulation of a system in which fluid flows in tubes. The tubes include one-way valves (=check valves), which prevent backflow in the real life. Yet, I've been having issues with defining the boundary condition to prevent backflow. It is pretty clear to me that I have to apply a custom boundary condition (UDF) on an interior wall where the check valve would sit. Yet, being new to UDFs and programming in C, I do not know how to write such a UDF, even after referring to the Fluent UDF manual: http://www.pmt.usp.br/academic/martoran/notasmodelosgrad/ANSYS%20Fluent%20UDF%20Manual.pdf

For example, if the one-way valve should prevent backflow in the negative-Y direction (meaning allow flow in the positive-Y direction), the algorithm should resemble such:

- For every time step:
- If velocity_y < 0
- then velocity_y = 0

- If velocity_y < 0

A more refined version would be:

- For every time step:
- If pressure just before the check valve < pressure just after the check valve
- then velocity_y = 0

- If pressure just before the check valve < pressure just after the check valve

Could you please help me write a UDF which I could apply onto an interior wall to act as a one-way valve to prevent backflow?

I will appreciate your help,

Kind regards,

Viliam

]]>So I would like to ask which physical parameters of fluids and solids I need to change, such as changing gravity acceleration to 10000G(because the time become 0.0001)?Or do other physical parameters need to be changed?

I'm not sure. Could you help me?Thank you 。😀

]]>I am trying to model drying of water from a porous media made with uniform glass spheres. I am applying 1000 W/m2 heat flux from top to accelerate the evaporation process. Can anybody please help me to model these phenomena in ANSYS or from where can I start?

]]>Can anyone please explain to me the pressure distribution(PFA) on the airfoil?

Thank you,

Abubakar khan

]]>I define a point on the plate right in the middle. I get the local heat flux and temperature value of this point using facets average. Then I calculate the number Nu.

What could be the reason for this to happen at the stopping point? Am I going the wrong way to calculate the local Nu number?

Thanks for your help.

]]>1.I want to draw a wellbore, but it's not vertical, I know its x and y coordinates at every height, can I enter the xy coordinate table into SpaceClaim to draw a cylinder, and if so, what step should I do?

2. I want to analyze the force on the sucker rod, but I don't know his material.I would like to analyze its deformation under external force (no need to consider fracture) and the analysis of friction force with liquid. Could you please tell me what parameters of the material I need to know if I cannot determine all the parameters of the material?

Thank you for your help.😀

]]>We can use an already defined UDF for manipulating the concentration / partial pressure of each phase. The makro is given here: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/flu_udf/flu_udf_sec_define_dpm_vp_equilib.html

So, I just want to discuss the part I need to modify:

for (is = 0; is < nc; is++) {

/* gas species index of vaporization */

int gas_index = TP_COMPONENT_INDEX_I(tp,is);

if(gas_index >= 0)

{

/* condensed material */

Material * cond_c = MIXTURE_COMPONENT(cond_mix, is);

/* condensed component molefraction */

real xi_cond = TP_COMPONENT_I(tp,is)/(molwt[gas_index]*molwt_cond);

/* particle saturation pressure */

real p_saturation = DPM_vapor_pressure(tp, cond_c, Tp);

if (p_saturation < 0.0)

p_saturation = 0.0;

/* vapor pressure over the surface, this is the actual Raoult law */

cvap_surf[is] = xi_cond * p_saturation * activity / UNIVERSAL_GAS_CONSTANT / Tp;

}

}

The last line includes a new variable named activity which is not given in the original Makro (so it is the field I need to calculate to incorporate real-gas-effects). The activity variable is a field such as «p_saturation» (in each parcel different). Based on the species we look at the moment, I have to call two functions different functions. I need something like that:

if (species[i] == "h2o")

{

activity = activityH2O(temperature, mole-fraction-h2o)

}

else if (species[i] == "h2o2")

{

activity = activityH2O2(temperature, mole-fraction-h2o)

}

As I never programmed in fluent, it is a bit overwhelming right now (I am programming c++ mostly in QT and OpenFOAM). However, I have no clue how to access the fields of fluent and how to define the two different functions. So I would like to have some support from you. I guess I need something like this:

double activityH2O(const class temperature, const class mole-fraction)

{

double temp = 1;

temp = exp(232*temperature) * moleFraction * some other things

}

However, as I never did something similar in Fluent I have no glue. Mostly, people use pre-defined Makros so I don't even know the Makro name for defining a function such as:

DEFINE_FUNCTION(activityH2O, ....)

What I get out of the code is that

- the Temperature of the parcel is Tp
- the mole fraction of component I is given by xi_cond

So the function should look somehow as:

double activityH2O(double Tp, double xi_cond)

{

double tmp;

// Calc tmp based on the droplet temperature Tp and h2o molefraction xi_cond

return tmp;

}

But still, I am not sure which class I need to for the objects Tp and xi_cond and if the definition of the function would be fine. I used "double" here in that example, but I am not sure if this is valid? I guess it is «real» as given in the UDF example above (probably it is «real»). However, I am not sure how to compare strings in fluent and how to get the actual name of the species we are looking at. The line

Material * cond_c = MIXTURE_COMPONENT(cond_mix, is);

Gives me the idea that I could use the cond_c pointer to call (maybe) the name of the species such das:

string nameOfSpecies = cond_c->name();

Finally the last question. How can I be sure that this UDF is used later on?

Thank you very much for your support.

Tobi

]]>Anybody know the link for the presentations of Simulation World 2020 ? (not 2021)

I am trying to watch some presentation from Dr Florian Menter.

Thanks in advance.

]]>I have done a 3D simulation of a Boeing 737 wing (half-model) at a particular flow condition. I did report definitions of Lift and CL which were obtained as 835.26 N and 0.638 respectively.

Now I want to verify the lift obtained using pressure distribution. However when I am computing the value of 'Integral of static pressure over wing surface' it is giving a value of -1703.45 N.

Why is the lift value different? Or where am I going wrong? Also, how do I know along which axis is the integral of static pressure over wing (which is a force with a negative sign) directed?

Thanks in advance.

]]>I'm about to study the effect of wall roughness on particle deposition and I AM SO CONFUSED!!

Is the roughness height the same as the absolute roughness?*

any explanation?

regards.

]]>Inner Diametre is 39.60 mm, Outer Diamtre 40.20 mm and the shell thickness 0.30mm. The weight of a ball is 2.70 g.

How do I add the air into the project? I read about treating air as an enclosure in earlier versions of Ansys CFD but I don't know how to add the air flow for my project in Ansys 2020 R2.

I would appreciate if anyone can show me step by step how to achieve the above.

Sincerely,

Xiu (practice_ping_pong)

]]>I have read in many papers that in a thin thermal boundary we have high local heat transfer coefficient, i.e better heat transfer by convection. what is the reason behind this?

Thank you in advance

]]>The horsepower should be around 1. I can't figure out what I'm doing wrong to get 300 HP. If anyone has any pointers, I'd appreciate it.

]]>The conservation of energy for this model is as follows:

If I am working with two phases, this equation can be written separately for each of the phases.

It is unclear to me which thermal conductivity is used for the heat flux term. In the mixture and VOF models they break down this term to show how an effective thermal conductivity is used. Am I to assume that for the Eulerian model that

q_phase1 = - k_phase1.∇T

q_phase2 = - k_phase2.∇T

where k is the material thermal conductivity of each phase?

]]>I am simulating a simple cylinder in regular waves (frequency domain) in AQWA - Hydrodynamic Diffraction. Here's a picture of the resulting pressures around the body:

The step on pressures on the free surface doesn't seem right. It also doesn't make sense to me that the largest hydrodynamic pressures are on the free surface... I mean, yes, wave action is larger there, but aren't hydrostatic pressures also included in this value, thus, increasing pressures on the bottom?

Any insight is appreciated :)

]]>I have already turned on the solidification and melting option. I can see the solidus option in fluid only.

]]>I am trying to follow the tutorial guide of Fluent 18, but I cannot find the `unsteady_compressible_R180.zip`

document, with the files `nozzle.msh`

, `pexit.c.`

Even searching for the tutorial name, I cannot find the files. I cannot create an ANSYS customer portal account as a student, and I am sent to ansys.com/academic where I still can't find the .zip file.

Any help?

Thank you in advance.

]]>I'm trying to write and compile a UDF that only allows rotation about the hinge, but I'm having trouble compiling it. I know ANSYS 20 has the ability to compile UDF's using fluent, but I only have access to Ansys 18.1. I have downloaded Microsoft Visual, and have created a text file "flap.txt" that I converted to "flap.c", but ANSYS is still not reading it properly.

There are no spaces in my file directory, and the "flap.c" file is saved where my output values are stored.

Can anyone provide a step-by-step process for writing a UDF, compiling it using MS Visual, and then importing it to Fluent? I've never done this before so I'd appreciate as much detail as possible!

Thank you!

]]>Hi everyone,

Does anyone know how to estimate velocity v2 in the circular pipe if given the velocity in an upstream annular pipe is v1? t is a very small gap compared to l1 and l2 so the flow travels in a different direction as shown in the diagram.

Initially, I was thinking of using mass conservation so the velocity only related to the cross-section area ratio. However, I am not sure how to account for the velocity loss in direction change and the vortices generated at the turning angle.

Another idea is to use the Bernoulli equation and accounts for the minor losses at the turn and at circular pipe 2. However, I only know P1 at the upstream but not sure about P2.

Any hints would be very much appreciated.

Best regards,

Lugia_06

]]>i am doing a 3D simulation for analysis of droplet spreading behavior on the structured surface.

i have written the udf is attached in the pictures.

To get spreading behavior/spreading factor/liquid-air interface the

"C_CENTROID(e,c0,t0);

r[i]=e[0]; "

is used in the udf.

1) the problem i am facing right now when the droplet hits the structured surface the fluent crashes every time.

2) if I remove that command mentioned above in the udf the fluent runs perfectly.

can you help me to fix this issue?

I need to use this command to get the spreading factor of the droplet impact.

i also attached the udf pictures and geometry pictures in the form pictures.

please reply urgently.

i have a due date of the project in my University.