# problem with units not matching with initialized data ?

• 88 Views
• Last Post 21 February 2019
• Topic Is Solved
sooraj546 posted this 14 February 2019

Sir,

My geometry consist of a simple 18 mm diameter spherical pellet with a initial concentration of the magnetite  6.8941 Kmol/m3 and carbon being 22.54169 Kmol/m3. These initial concentration when converted comes up to magnetite  0.2342 and carbon 0.7658 as mole fraction on manual calculation. so i just initialized it as shown in the second figure and started the simulation.

I have given an volume average of molar concentration of each species as shown in figure 3 as results.

Now the problem i am facing :

if u notice here the initialized mole fraction of 'm' and 'c' are 0.2342 and 0.7658 but on result plotting the starting point of c  Kmol/m3 are 0.036 and m is a very low value. Why is it coming so it should match what is being entered rt ? I cant find y is it happening so Kindly help me out with this

figure-1

figure -2

figure-3 where h- hematite m-magnetite w-wustite c-carbon etc

abenhadj posted this 14 February 2019

What does the Volume Report tell you after Initialization and after one time step?

Best regards,

Amine

sooraj546 posted this 14 February 2019

As mentioned above I am intializing carbon which is given terminology c in figure 3 with 0.7658 but volume report start from 0.036 kmol/m3 which is a absurd as in reality it should be 22.54 mol/ m3 similar thing is repeated with magenite as well which is taken as m in figure 3

abenhadj posted this 14 February 2019

Just follow what I have asked for: Under Volume Reports report the molar concentration directy after initialization and then after one iteration

Best regards,

Amine

• Liked by
sooraj546 posted this 18 February 2019

really sorry for the delay i was travelling sir.

this is what i have initialized with

this is what i am getting after initialized

after 1 iteration

Its a just 18 mm diameter pellet, density of pellet is 2170 kg/m3 from which we can get mass and from composition i have formulated

fe3o4 conc to be 6.8941 kmol/m3

carbon conc to be 22.54169 kmol/m3

so mole fraction comes upto c-0.7658 and fe3o4-0.2342 ? y is it showing a different value.

abenhadj posted this 18 February 2019

What is the the molar mass of mixture after intialization?

Molar fraction = Molar concentration * Mixture Molar mass / Mixture Density

Best regards,

Amine

• Liked by
sooraj546 posted this 19 February 2019

thanks a lot for replying sir

abenhadj posted this 19 February 2019

Yes and what is the outcome: Was there a mistake in the calculation?

Best regards,

Amine

• Liked by
sooraj546 posted this 20 February 2019

Sir,

i have done the calculation and the values are matching, so by your explanation

molar concentration  = molar fraction* mixture density (kg/m3) / mixture molar mass (kg/Kmol); on rearranging

unit of molar concentration will be  in (Kmol/m3) rt how can it be equvilant to Kmol/m3.

eg:

mixture density from fluent = 2.58 kg/m3

mole fraction of M = 0.2342 and C = 0.7658

so mixture molar mass (kg/Kmol) = (0.2342*232) + (0.7658*12) = 63.524 (kg/Kmol)

so molar concentration of M = (0.2342* 2.58 (kg/m3) ) / 63.524 = 0.0095143 kmol / m3  excatly same as the fluent value

but in reality:

Its a just 18 mm diameter pellet, density of pellet is 2170 kg/m3 from which we can get mass and from composition i have formulated

M conc to be 6.8941 kmol/m3 i.e (4.884 / (232 (kg/Kmol)* vol of pellet(m3))) where 4.884 is the weight of M in grams

so mole fraction comes upto c-0.7658 and fe3o4-0.2342 ? SO y is it showing a different value.

Upon analysis all theses are happening due to the change in density of mixture i have given corresponding density of each species and given the mixture density to be formulated as in-compressible ideal gas which has reduced the density of the mixture to be 2.58 which in reality is 2170 kg/m3 so i should rectify it first and c if results are coming. When its done i will update you sir,

abenhadj posted this 20 February 2019

So the calculation in Fluent is correct.

You need to to check the density of your material. Use density as volume-weighted density and not IEOS.

Best regards,

Amine

sooraj546 posted this 20 February 2019

The calculation of fluent was correct but the density term through out is considered constant of 2170 kg/m3 if i considered it as volume weighted average  that wont be the case. Mine is a mixture of various species so how to define a constant density i tried with this udf

#include "udf.h"

DEFINE_PROPERTY(mix_density, c, t)

{

real rho;

rho = 2170;

return rho;

}

But for this simple code i am getting error on compiling

then i tried in series

i am using visual studio 64 bit command prompt to start it my problem is 3d as well what should i do sir

rwoolhou posted this 20 February 2019

You should be able to fix the mixture density in the materials panel.

Re the UDF, please don't use + in the directory structure. What error did you get when you tried to compile the code?

sooraj546 posted this 20 February 2019

No sir there is no option of entering a constant density in mixture panel

no error when i build the compiled udf as shown below:

Copied D:\SOORAJ\project CFD- FLUENT

ew14-8-2017\SINGLE PELLET TRIAL\single pellet+VR/D:\SOORAJ\project CFD- FLUENT

ew14-8-2017\SINGLE PELLET TRIAL\single pellet+VR\mixture density.c to libudf223218\src

Creating user_nt.udf file for 3ddp ...

(system "copy "C:\PROGRA~1\ANSYSI~1\v181\fluent"\fluent18.1.0\src\udf\makefile_nt.udf "libudf223218\win64\3ddp\makefile" ")

1 file(s) copied.

(chdir "libudf223218")(chdir "win64\3ddp")

Done.

but when i load it aforementioned error comes

sooraj546 posted this 20 February 2019

THE code simply worked when i compiled it in a different system and then uploaded it into my system i dnt no whats wrong.

Will update with my results soon

abenhadj posted this 20 February 2019

Just use simple inbuilt models before complicating the things...

Best regards,

Amine

• Liked by
abenhadj posted this 20 February 2019

Assign the same density to the components of the pellets (I have never seen a mixture or pellet where the density is independent of the constituents)

Best regards,

Amine

• Liked by
sooraj546 posted this 21 February 2019

sir actually its a solid gas interaction problem so density of gas as u all know will be very less when compared to the density of solid so if i give volume weighted average even after applying maximum relaxation of 0.1 for species and temperature i am getting divergence in species and energy part tats y i tried applying a constant density just for observing whats will happen.................................but then also divergence even after applying maximum relaxation .

Now i going to write a mas weighted average of solid constituents as the mixture density which is essential and c whats going to happen

ONCE AGAIN I REALLY APPRECIATE THE TIME U SPEND TO  ADVICE ME. THANKS A LOT

WILL update soon with my results

abenhadj posted this 21 February 2019

Be concise with your description and just focus on the resolution of this part: Do the suggestions provided helped you to get the Fluent results as the one you would expect. This is actually user error and not related to Fluent.

Best regards,

Amine

sooraj546 posted this 21 February 2019

I was playing with density as what ever i do with it deals to divergence at the end. Now i have tried it with a composition dependent density function even though same is the experience. the convergence plot is given below.

Updating solution at time level N... done.

iter continuity x-velocity y-velocity z-velocity energy do-intensi fe2o3 fe3o4 feo fe co co2 c time/iter

# Divergence detected in AMG for x-momentum: protective actions enabled!

# Divergence detected in AMG for x-momentum, temporarily solve with BCGSTAB!

Divergence detected in AMG solver: x-momentum# Divergence detected in AMG for y-momentum: protective actions enabled!

# Divergence detected in AMG for y-momentum, temporarily solve with BCGSTAB!

Divergence detected in AMG solver: y-momentum# Divergence detected in AMG for z-momentum: protective actions enabled!

# Divergence detected in AMG for z-momentum, temporarily solve with BCGSTAB!

Divergence detected in AMG solver: z-momentum# Divergence detected in AMG for pressure correction: protective actions enabled!

# Divergence detected in AMG for pressure correction, temporarily solve with BCGSTAB!

....

.

.

.

.

..

Error at host: floating point exception

Error at Node 0: floating point exception

Error at Node 1: floating point exception

Error at Node 2: floating point exception

Error at Node 3: floating point exception

Error at Node 4: floating point exception

Error at Node 5: floating point exception

Error at Node 6: floating point exception

Error at Node 7: floating point exception

Error at Node 8: floating point exception

Error at Node 9: floating point exception

Error: floating point exception

Error Object: #f

Kindly help me out

rwoolhou posted this 21 February 2019

The UDF won't like the + in the path: don't use characters like that in directory structures. Fluent is based on UNIX coding so whilst more recent versions can handle spaces in the directory tree it doesn't work with £ \$ + type symbols. Experienced users tend to avoid spaces too: the only non letter or number symbols I use are - and _

Looking at the model, I think we may have missed the obvious problem. What size and shape is your domain?

• Liked by
sooraj546 posted this 21 February 2019

its just an 18 mm diameter spherical pellet. I have already taken your suggestion in to account sir, THANKS A LOT FOR IT.  I have used a tetrahedral  with some what medium mesh

while reading about divergence issues i have seen experts comment about meshing itself can cause some problems etc. .................... so should i try using different mesh as well

abenhadj posted this 21 February 2019

Is the issue with density finished: Yes or No?

Best regards,

Amine

sooraj546 posted this 21 February 2019

no sir my problem is running only when mixture density is given ideal gas or in compressible ideal gas rest all even with udf its divergence.

abenhadj posted this 21 February 2019

And what are you now solving in this pellet. Again be informative but concise. Share information about Boundary Conditions, settings, etc.

Best regards,

Amine

sooraj546 posted this 21 February 2019

The mixture of iron ore and coal particle make up a composite pellet which is considered as a porous medium. Both solid and gas phases are assumed to be continuum. The pellet shape is assumed to be spherical. these are the reactions which are happening inside the pellet.

3Fe2O3  + CO  =  2Fe3O4  +  CO2

Fe3O4  + CO  =  3FeO  +  CO2

FeO + CO  =  Fe  +  CO2

CO2  + C  =  2CO

except co and co2 all others are solid , My intention is just to find out the concentration and temperature evolution with time inside the pellet. So initially a porous-spherical pellet is there which contain carbon(C) and iron ore particle (Fe3O4) only,  it reacts with CO giving the following feo fe co2 etc as shown in the reactions above. In mass balance the diffusion of the gases to solid particle should be considered. All reaction are happening in the surface of the particle .

Modelling

- i have taken a pellet in species transport included all these reaction and its rate as VR rate udf.

- defined the pellet with desired porosity calculated separately

- radiation boundary condition with external temperature 1773 K etc

- Intial c and fe3o4 in pellet which i have initialized

- each species density defined except for co and co2 as they are selected from fluent data base.

So now my problem is running only when mixture density is given ideal gas or in compressible ideal gas rest all even with udf its divergence.

abenhadj posted this 21 February 2019

For the gaseous mixture the only realistic EOS will be at least ideal gas ( assumed closed domain= pellet).

Best regards,

Amine

sooraj546 posted this 21 February 2019

Ya its assumed to be a closed domain with only heat transfer from external through radiation. So what should i do sir go for multi phase

rwoolhou posted this 21 February 2019

Let's break it all down. Ideally our role is to help with the solver side of things: you need to work out the theory & "why".

The reaction scheme means you're creating volume: ie you have many more moles of product than reactant. In reality the CO will react at the outer surface with some penetration, and the outer surface of the particle will burn back.  In your model you're assuming perfect mixing and the additional volume just means you're going to increase the pressure: this will also impact the reaction rates as they're (probably) a function of partial pressure.

Why aren't you considering a porous sphere in a larger domain with moving gas? This means you can set up the reactions with the porous "solid" and see if the gases actually penetrate beyond the outer shell.