CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Expanding Bubble Underwater (https://www.cfd-online.com/Forums/fluent/103027-expanding-bubble-underwater.html)

dreamchaser June 8, 2012 14:22

Expanding Bubble Underwater
 
Hey guys,

I'm working on a simulation where I'm trying to simulate the rapid growth of a bubble underwater.( it grows to a diameter of 1.5cm in 100ms)
The whole purpose is to see how the shockwaves generated from the bubble interact with the surrounding walls.
This bubbe expansion is taking place within a parabolic wall.

The closes thing I found to my problem was a UDF that models the swellig of a particle. I found it from the Fluent 12 UDF Manual. However, whenever I run this UDF I get the error about how my material is not defined.

I would appreciate any help or insight you can provide for my problem. I am not sure if I am approaching this problem correctly or not.

Many thanks

Error: C:\Users\sramjatan1\Desktop\EVAP_SWELLINGLAW.C: line 9: P_MATERIAL: undeclared variable


------------------------------------------------------------
#include "udf.h"
DEFINE_DPM_LAW(Evapor_Swelling_Law, p, ci)
 
 
{ real swelling_coeff = 1.1;
/* first, call standard evaporation routine to calculate * * the mass and heat transfer */
VaporizationLaw(p);
/* compute new particle diameter and density */
P_DIAM(p) = P_INIT_DIAM(p)*(1. + (swelling_coeff - 1.)* (P_INIT_MASS(p)-P_MASS(p))/(DPM_VOLATILE_FRACTION(p)*P_INIT_MASS(p)));
P_RHO(p) = P_MASS(p) / (3.14159*P_DIAM(p)*P_DIAM(p)*P_DIAM(p)/6);
P_RHO(p) = MAX(0.1, MIN(1e5, P_RHO(p))); }

ghost82 June 9, 2012 03:28

P-material refers to dpm injection: have you define your injection and dpm material (this one after setting injection(s))?

dreamchaser June 11, 2012 14:16

Quote:

Originally Posted by ghost82 (Post 365544)
P-material refers to dpm injection: have you define your injection and dpm material (this one after setting injection(s))?

ghost82,

when you say "define your injection and dpm material" is this done in the UDF or is this done on the fluent interface panel??

What would I need to add to my UDF code to properly define my injection and dpm material??
I"m sorry but I'm new to this software.

thanks so much for the help

ghost82 June 12, 2012 03:32

Hi Mike,
you have to set injections not in udf but in fluent panels; see this link:
http://hpce.iitm.ac.in/website/Manua...htm#Injections

After setting injections you have to go to material panel, and you will see a new item added for dpm; edit it with data for your material; ex: air if your bubble contains air.


PS: remember also to hook your udf once interpreted/compiled.
http://hpce.iitm.ac.in/website/Manua...ec-use-dpm-law

dreamchaser June 18, 2012 11:13

ghost82,

I followed your directions and it still says

Error: C:\Users\sramjatan1\Desktop\EVAP_SWELLINGLAW.C: line 9: P_MATERIAL: undeclared variable

I created an injection type and edited it in the material panel also.
However, when I interpret my UDF it still says my P_Material is not defined. What model am I supposed to run this as?

I'm not sure what I"m doing wrong still.

thanks for the help


All times are GMT -4. The time now is 11:30.