CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Spray boundary conditions (http://www.cfd-online.com/Forums/openfoam-solving/59728-spray-boundary-conditions.html)

 coastal593 April 17, 2007 14:36

hi all, i have an issue wit

hi all,

i have an issue with spray problem i'm trying to solve. although the geometry is somewhat complex, there are 4 element types. 1) gas jet at the sprayer (inlet), 2) pressure sink (outlet), 3) solid walls, 4) atmosphere. my simulation continues to diverge and i was hoping someone might have some suggestions. my simulation is being done with dieselFoam.

(also, for unkonwn reasons i see --> FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 -> 5000 often, although it shows up randomly. even changing my initial time step may be the difference between seeing this error and not at the very start of the simulation. my droplet initial temperature is 295).

i have chemistry and turbulence turned off.

for walls i have U at fixedValue and p at zeroGradient.

pressure sink is p at totalPressure, uniform VALUE and U is pressureInletOutletVelocity, uniform (0 0 0).

gas jet is p at zeroGradient, U at fixedValue uniform (X, Y, Z).

atmosphere is fluxCorrectedVelocity, uniform (0 0 0) and p is totalPressure.

***i should note that in the middle of trying to work out these problems, i just went ahead and assigned every single boundary as p at zeroGradient and U at fixedValue, uniform (0 0 0) and i still have the same exact problems*** ... either i diverge if the simulation starts, or i end up with thermo out of range.

i feel like i must be missing something fairly simple that must explain this range of problems even in the simple case with p at zeroGradient and U at fixedValue.

any help would be greatly appreciated.

thanks,
anthony

 dmoroian April 18, 2007 02:45

Hi Anthony, A wrong number of

Hi Anthony,
A wrong number of imposed boundary conditions is a common cause for divergent solutions.
Isn't this a compressible fluid flow? If it is, then at least at the inlet (gas jet) you should specify a value for the temperature. The well posedness of a problem was already explained on the forum by Hrv, but if you don't find it (is related to the theory of characteristics), then ask for more http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Dragos

 coastal593 April 18, 2007 16:18

hi, i've been able to get e

hi,

i've been able to get everything not to diverge. however, now, whenever the number of parcels gets to between 28-30, i get ...

[1]+ Exit 1 mpirun -np 6 dieselFoam . TRIAL-1 -parallel </dev/null>&TRIAL-1/1.log
[4]
[4]
[4] --> FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 -> 5000; T = 198.198#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&)
#1 Foam::error::abort()
#2 Foam::specieThermo<foam::janafthermo<foam::perfect gas> >::H(double) const
#3 Foam::hMixtureThermo<foam::reactingmixture>::calcu late()
#4 Foam::hMixtureThermo<foam::reactingmixture>::corre ct()
#5 main
#6 __libc_start_main
#7 __gxx_personality_v0 at ../sysdeps/x86_64/elf/start.S:116
[4]
[4]
[4] From function janafThermo<equationofstate>::checkT(const scalar T) const
[4] in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.4/src/thermophysicalModels/specie/lnInclude/ janafThermoI.H at line 73.
[4]
FOAM parallel run aborting
[4]

the system i am running is about as simple as i can possibly imagine. water is my spray fluid at ~140 m/s, ~3 micron droplets with appropriate mass. i have eliminated all breakup and evaporation for simplicity to see if that was the problem.

adding outercorrectors (as had been previously suggested to fix problems in the enthalpy) doesn't change the behaviour at all. there is no indication of any trouble in the simulation before this occurs ...

Number of parcels in system | 27
Injected liquid mass....... | 3.5949e-08 mg
Liquid Mass in system...... | 3.5949e-08 mg
SMD, Dmax.................. | 0.413204 mu, 0.493195 mu
Added gas mass = -4.84788e-07 mg
Evaporation Continuity Error| -4.84788e-07 mg
ExecutionTime = 860.5 s ClockTime = 867 s

Courant Number mean: 6.27709e-08 max: 0.100579
deltaT = 6.53336e-09
Time = 2.63312e-07

Evolving Spray
Solving chemistry
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for O2, Initial residual = 8.82055e-05, Final residual = 6.65033e-09, No Iterations 1
DILUPBiCG: Solving for H2O, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for h, Initial residual = 0.000215537, Final residual = 6.51337e-09, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.000474192, Final residual = 5.0695e-10, No Iterations 1
DICPCG: Solving for p, Initial residual = 1.69746e-07, Final residual = 1.952e-13, No Iterations 1
DICPCG: Solving for p, Initial residual = 6.26857e-11, Final residual = 6.26857e-11, No Iterations 0
DICPCG: Solving for p, Initial residual = 6.26857e-11, Final residual = 6.26857e-11, No Iterations 0
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.18949e-16, global = 4.32547e-18, cumulative = -1.86674e-15
DICPCG: Solving for p, Initial residual = 4.49639e-06, Final residual = 3.27455e-12, No Iterations 1
DICPCG: Solving for p, Initial residual = 1.82782e-09, Final residual = 1.92725e-15, No Iterations 1
DICPCG: Solving for p, Initial residual = 9.09835e-13, Final residual = 9.09835e-13, No Iterations 0
DICPCG: Solving for p, Initial residual = 9.09835e-13, Final residual = 9.09835e-13, No Iterations 0

my current solution config is:
PISO
{
nOuterCorrectors 3;
nCorrectors 3;
nNonOrthogonalCorrectors 3;
momentumPredictor no;
}
schemes are exactly taken from the dieselFoam tutorial case in 1.4.

thermoType hMixtureThermo<reactingmixture>;

CHEMKINFile "\$FOAM_ROOT/\$FOAM_CASE/chemkin/chem.inp";
CHEMKINThermoFile "\$FOAM_ROOT/\$FOAM_CASE/chemkin/therm.dat";

inertSpecie N2;

liquidFuelComponents
(
H2O
);

H2O H2O defaultCoeffs;

i am not interested in any chemistry or combustion here so they are turned off.

any thoughts? i have tried most everything i can think of.

thanks,
anthony

 coastal593 April 19, 2007 10:16

hi again, just thought i'd

hi again,

just thought i'd let everyone know that i reran this with the standard spray conditions present in the dieselfoam tutorial and experienced the exact same behaviour at exactly the same time (parcels no. 28).

so it doesn't look like it's a problem with the spray. perhaps it is still my boundary conditions.

anthony

 dmoroian April 19, 2007 11:18

What boundary conditions do yo

What boundary conditions do you have for temperature?

Dragos

 coastal593 April 19, 2007 16:42

hi dragos, i have set every

hi dragos,

i have set everything at uniform 295 (same as my droplet temperature).

as it turns out i'm spraying pretty well now. i believe my problem was a ridiculous pressure set for the sprayer using the unitInjector, which caused my initial droplet veloctity to be ridiculously high. i can't prove that's the problem but after moving to the rail injector and setting a more reasonable pressure everything seems to be working.

one question: no matter the configuration, the simulation seems to add 1 parcel every simulation step. why is this? i have my injection and mass flow rate set to uniform across my entire simulation time, but at this rate i'll be well past my nParcel limit before i reach the end of the simulation.

also the parcel mass doesn't seem to be written out in the VTK data. i assume this is calculated from the properties of the liquid and it's diameter/volume? it doesn't seem like the mass defined in the injector does much ...

thanks,
anthony

 coastal593 April 19, 2007 17:02

sorry for the double post ...

sorry for the double post ...

droplet properties do not seem to come through in the VTK data when calculating in parallel via reconstructPar and then foamToVTK. i've been running on a single proc but i'd really like to move to 8 http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

anthony

 mattijs April 19, 2007 17:28

Is this 1.4? It should reconst

Is this 1.4? It should reconstruct all the fields in the lagrangian subdirectory of the time directories.

Check whether you have lagrangian directories on all processors.

 coastal593 April 19, 2007 18:13

hi mattijs, yes i have lagr

hi mattijs,

yes i have lagrangian directories on all processors. only one of processors has any particles in it and in that processor directory i have all of the files i would expect. in the others, i simply have an empty position file ... also expected.

then running reconstructPar it indicates that it is reconstructing the lagrangian fields. however, afterwards the reconstructed lagrangian directory contains only the positions file, the data in which is absolutely correct. no other files are present.

thoughts?

anthony

 coastal593 April 19, 2007 18:13

again, i forgot to mention tha

again, i forgot to mention that yes this is 1.4.

 mattijs April 20, 2007 05:59

Hi Anthony, trying to repli

Hi Anthony,

1)
- run dieselFoam/wedge case for a few timesteps
- decomposePar a time step. Use Metis such that no droplets on 2nd processor (so has all files but all zero length fields)
- reconstructPar and compare to original. I cannot see any difference.

2) same but also delete all lagrangian field files (except positions). Again no difference.

Is your case small? Can you send it over? m dot janssens at opencfd.co.uk

 coastal593 April 20, 2007 09:13

well you're absolutely right i

well you're absolutely right it works beautifully for the wedge case, but completely fails for my own.

i will have to play around a bit (the case is large). i may email it to you if i end up completely stumped.

anthony

 coastal593 April 20, 2007 10:08

the only difference in the str

the only difference in the structure of the decomposed case compared to that of the tutorial wedge case is that my particles exist on the LAST processor, not the first. other than that i can't find a single difference.

i am using metis for all of the decompositions.

 coastal593 April 20, 2007 13:01

for the time being i guess i a

for the time being i guess i am resolved to simply operate on one processor ... i'm getting the right data, just slowly ...

i do have one other question though.

i do not at all understand some of the fields in the injectorProperties dictionary, specifically mass and nParcels.

-- the simulation always injects at least 1 parcel per time step.
-- nParcels clearly isn't the total number of injected parcels in the simulation. what is it really?
-- if i increase my time step with all the same injector settings, the simulation reports greater liquid mass injected even though it injects the exact same number of parcels ... just one per time step.
-- therefore the number of parcels injected per unit time changes drastically.

i don't understand how these things are related at all. could someone enlighten me? i have to be missing something simple ...

 mattijs April 20, 2007 13:07

Seems to be a bug in reconstru

Seems to be a bug in reconstructPar. Can you submit a bug report and we'll have a look at it.

 All times are GMT -4. The time now is 18:09.