CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

sprayFoam hangs during parcel injection

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 8, 2018, 23:46
Question sprayFoam hangs during parcel injection
  #1
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 7
sammy1 is on a distinguished road
Hi all,

I've been running some cases in sprayFoam to simulate the breakup and dispersion of water droplets in different air flows. My first case was a liquid jet injected into a transverse crossflow that worked quite nicely, however, my second case is a nozzle spray into a vertical plume of air and is currently experiencing issues during parcel injection. All of my cases are 2D.

I have attached a zipped case file below. Ordinarily I would inject the parcels once the gaseous phase has been allowed to develop, however, due to the constraints of file-size for uploading the case, I've just got the injection starting from time 0. Once injection begins, the solver runs for a few iterations and then stops and hangs on the lines:

Code:
Solving 2-D cloud sprayCloud

Cloud: sprayCloud injector: model1
    Added 120 new parcels
The solver sits in this state until I ctrl+c to exit.

I've gone back to run my jet in crossflow solver, and it is still working. I have also copied the ./constant/sprayCloudProperties from the crossflow solver into the plume case and the issue comes up, so I believe this error could be arising due to my boundary conditions in ./0? I've printed my sprayCloudProperties below.

If anyone could take some time to look at the case it would be greatly appreciated. Apologies if I've missed anything with regards to forum rules/post content - this is my first post ever! Please let me know if I can provide any information that might help someone give me a hand.
Cheers,
Sam

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       dictionary;
    location    "constant";
    object      SprayCloudProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solution
{
    active          true;
    coupled         true;
    transient       yes;
    cellValueSourceCorrection on;
    maxCo           0.3;

    sourceTerms
    {
        schemes
        {
            rho             explicit 1;
            U               explicit 1;
            Yi              explicit 1;
            h               explicit 1;
            radiation       explicit 1;
        }
    }

    interpolationSchemes
    {
        rho             cell;
        U               cellPoint;
        thermo:mu       cell;
        T               cell;
        Cp              cell;
        kappa           cell;
        p               cell;
    }

    integrationSchemes
    {
        U               Euler;
        T               analytical;
    }
}


constantProperties
{
    T0              298;

    // place holders for rho0 and Cp0
    // - reset from liquid properties using T0
    rho0            1000;
    Cp0             4187;

    constantVolume  false;
}


subModels
{
    particleForces
    {
        sphereDrag;
		gravity;
    }

    injectionModels
    {
        model1
        {
            type            coneNozzleInjection;
            SOI             0.25000;
            massTotal       1.4e-4;
            parcelBasisType mass;
            injectionMethod disc;
            flowType        constantVelocity;
			UMag			18;
            outerDiameter   1.5e-4;
            innerDiameter   0;
            duration        0.1;
            position        (0.1 0.275 0);
            direction       (0 -1 0);
            parcelsPerSecond 20000000;
            flowRateProfile table
				(
				(0				0)
				(0.25			1.4e-3)
				(0.35			0)
				(0.36			0)
				);

            Cd              constant 0.9;

            thetaInner      constant 0.0;
            thetaOuter      constant 30.0;

            sizeDistribution
            {
                type        RosinRammler;

                RosinRammlerDistribution
                {
                    minValue        1e-06;
                    maxValue        0.00015;
                    d               0.00015;
                    n               3;
                }
            }
        }
    }

    dispersionModel none;

    patchInteractionModel standardWallInteraction;

    heatTransferModel RanzMarshall;

    compositionModel singlePhaseMixture;

    phaseChangeModel liquidEvaporationBoil;

    surfaceFilmModel none;

    atomizationModel none;

    breakupModel    ReitzDiwakar; // ReitzKHRT;

    stochasticCollisionModel none;

    radiation       off;

    standardWallInteractionCoeffs
    {
        type            escape;
    }

    RanzMarshallCoeffs
    {
        BirdCorrection  true;
    }

    singlePhaseMixtureCoeffs
    {
        phases
        (
            liquid
            {
                H2O               1;
            }
        );
    }

    liquidEvaporationBoilCoeffs
    {
        enthalpyTransfer enthalpyDifference;

        activeLiquids    ( H2O );
    }

    ReitzDiwakarCoeffs
    {
        solveOscillationEq yes;
        Cbag            6;
        Cb              0.785;
        Cstrip          0.5;
        Cs              10;
    }

/*
    ReitzKHRTCoeffs
    {
        solveOscillationEq yes;
        B0              0.61;
        B1              40;
        Ctau            1;
        CRT             0.1;
        msLimit         0.2;
        WeberLimit      6;
    }
*/
    TABCoeffs
    {
        y0              0;
        yDot0           0;
        Cmu             10;
        Comega          8;
        WeCrit          12;
    }
}


cloudFunctions
{}


// ************************************************************************* //
Attached Files
File Type: zip plume2Copy.zip (15.9 KB, 30 views)
sammy1 is offline   Reply With Quote

Old   September 9, 2018, 07:13
Default
  #2
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 7
sammy1 is on a distinguished road
Further to the above, I found this thread outlining a very similar problem, which was solved by ensuring the parcels weren't becoming 'stuck' at the boundary of the domain. I don't believe mine is caused by the same issue but would be grateful if someone could confirm.
https://bugs.openfoam.org/view.php?id=1132#bugnotes
Cheers,
Sam
sammy1 is offline   Reply With Quote

Old   September 9, 2018, 22:30
Talking Possible fix
  #3
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 7
sammy1 is on a distinguished road
Hi all,
Not sure how many people will ever come across a similar problem but I believe I've solved it so hopefully this helps someone, somewhere, someday.

After changing virtually every part of my code one by one, it appeared that my blockMesh was the culprit in this case. I fully rebuilt my blockMeshDict from the ground up (not that it was very complex in the first place, but since I'm new it took some time!) and I've attached my OLD and NEW blockMeshDict as .txt files to this post.

It appears that the particle injection is now happening without hanging, fingers crossed that it stays that way!

Cheers,
Sam
Attached Files
File Type: txt blockMeshDictNEW.txt (1.9 KB, 35 views)
File Type: txt blockMeshDictOLD.txt (2.0 KB, 23 views)
sammy1 is offline   Reply With Quote

Old   September 10, 2018, 10:21
Default
  #4
New Member
 
SSA
Join Date: Dec 2017
Posts: 16
Rep Power: 8
senthilathiban is on a distinguished road
Hi, I am facing the same issue. could you just explain, what changes have you made in your blockMesh..?
senthilathiban is offline   Reply With Quote

Old   September 10, 2018, 21:09
Default
  #5
New Member
 
Join Date: Jul 2018
Posts: 4
Rep Power: 7
sammy1 is on a distinguished road
Hi senthilathiban,
I believe the only major changes between my old and new blockMeshDict files are the way I have defined the vertices and the blocks. I am not an expert and have no idea why this decided to work, but as you can see below in the OLD file I define them as:

Code:
vertices
(
	(0		0	  	0.5) //0
	(64	 	0	  	0.5) 
	(64	 	0	 	-0.5)
    	(0	 	0	 	-0.5)
	(0	 	300  		0.5) //4
	(64	 	300  		0.5)
	(64	 	300 		-0.5)
	(0	 	300 		-0.5)
	(136 		0	  	0.5) //8
	(136 		0	 	-0.5)
	(136 		300  		0.5)
	(136 		300 		-0.5)
	(200 		0	  	0.5) //12
    	(200 		0	 	-0.5)
	(200 		300  		0.5)
	(200 		300 	-	0.5) //15
);
blocks
(
	hex (0 1 2 3 4 5 6 7) (50 1 300) simpleGrading (1 1 ((0.3 0.1 1) (0.4 0.4 1) (0.3 0.6 1))) //block 0
	hex (1 8 9 2 5 10 11 6) (100 1 300) simpleGrading (1 1 ((0.3 0.1 1) (0.4 0.4 1) (0.3 0.6 1))) //block 1
	hex (8 12 13 9 10 14 15 11) (50 1 300) simpleGrading (1 1 ((0.3 0.1 1) (0.4 0.4 1) (0.3 0.6 1))) //block 2
);
Whereas in the NEW FILE they are defined as:
Code:
vertices
(
    (0 			0 		0) //0
    (0 			0 	 	1)
    (64 		0 	 	1)
    (64 		0 		0)
    (0 			300 		0) //4
    (0 			300 		1)
    (64 		300 		1)
    (64 		300 		0) //7
    (136 		0	 	0)
    (136 		0	 	1)
    (136 		300 		0)
    (136 		300 		1) //11
    (200 		0	 	0)
    (200 		0	 	1)
    (200 		300 		0)
    (200 		300 		1) //15



);

blocks
(
    hex (0 1 2 3 4 5 6 7) (1 64 300) simpleGrading (1 1 ((0.3 0.1 1) (0.4 0.4 1) (0.3 0.6 1)))
	hex (3 2 9 8 7 6 11 10) (1 144 300) simpleGrading (1 1 ((0.3 0.1 1) (0.4 0.4 1) (0.3 0.6 1)))
	hex (8 9 13 12 10 11 15 14) (1 64 300) simpleGrading (1 1 ((0.3 0.1 1) (0.4 0.4 1) (0.3 0.6 1)))
);
The difference here is that the number of cells in each direction after the "hex (0 1 2...)" section are changed, which I think is a result of the vertices that you define as a part of that hex section. On my second attempt I followed this page as closely as possible:
https://www.openfoam.com/documentati.../blockMesh.php
Good luck!
sammy1 is offline   Reply With Quote

Old   November 15, 2018, 11:47
Default
  #6
Member
 
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 7
john myce is on a distinguished road
Hi Sammy,


When you did your blockMesh modification, did you change also the coordinate of the coneNozzleInjector or you just kept the initial one



Cheers
john myce is offline   Reply With Quote

Old   May 29, 2023, 08:02
Default
  #7
Senior Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10
kk415 is on a distinguished road
Hello Foamers,


I am developing a coupled solver of interFoam and SprayFoam, i.e. particles are injected from the VOF fluid. I am getting this similar issue as mentioned in the topic for my parallel run. I guess I need some modification in my code for the parallel run. But I have no idea where and which way to do the modification. How such kind of modifications are done!! Anyone can help me with any reference material. I deeply appreciate.


Krishna Kant
kk415 is offline   Reply With Quote

Reply

Tags
bug, injection, lagrangian, parcel, sprayfoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
file injection.: continuity fail; volume injection.: wrong total mass blerli_91 Fluent Multiphase 6 October 2, 2018 05:34
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
Parcels injection with sprayFoam Cluap OpenFOAM Running, Solving & CFD 3 February 15, 2016 07:36
I want to add the Coulomb force to the parcel of sprayFoam. kame OpenFOAM Programming & Development 0 November 2, 2015 20:03
injection problem Mark New FLUENT 0 August 4, 2013 01:30


All times are GMT -4. The time now is 20:21.