CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Problems with setFields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2019, 11:58
Default Problems with setFields
  #1
New Member
 
Paul
Join Date: Mar 2019
Posts: 3
Rep Power: 7
pbOPEN is on a distinguished road
Hi all,

I am having difficulties with the setFields function. I am attempting to run a modified damBreak example, but I am unable to properly initialize water where I want it.

To make the modified mesh, I copied the damBreak tutorial to my run directory, and made some small edits to the mesh. After running blockMesh and modifying setFieldsDict, I attempted to run setFields. It successfully ran with no errors, however, the water is only appearing on the walls of my mesh (with no water in the interior). I have attached a picture of what I am seeing in paraFoam.

I have tried troubleshooting this in various ways. I completely rewrote setFieldsDict, I copied alpha.water.orig to alpha.water before running setFields, etc. I am still unable to properly set water where I want it.

Any help you can provide would be much appreciated and if you need anything else from me, just let me know.

Thank you.
Attached Images
File Type: png setFields.PNG (6.3 KB, 8 views)
pbOPEN is offline   Reply With Quote

Old   March 26, 2019, 10:28
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

A bit of context would be nice. Could you post "some small edits to the mesh"?
Could you post your setFieldsDict modifications?
alexeym is offline   Reply With Quote

Old   March 26, 2019, 11:23
Default
  #3
New Member
 
Paul
Join Date: Mar 2019
Posts: 3
Rep Power: 7
pbOPEN is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

A bit of context would be nice. Could you post "some small edits to the mesh"?
Could you post your setFieldsDict modifications?
Yes, thank you for the help.

Here is my blockMeshDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices
(
    (0 0 0)
    (60 0 0)
    (60 44.45 0)
    (0 44.45 0)
    (0 21.825 0)
    (0 22.625 0)
    (-10 22.625 0)
    (-10 21.825 0)
    (0 0 1)
    (60 0 1)
    (60 44.45 1)
    (0 44.45 1)
    (0 21.825 1)
    (0 22.625 1)
    (-10 22.625 1)
    (-10 21.825 1)
    (60 21.825 0)
    (60 21.825 1)
    (60 22.625 0)
    (60 22.625 1)
);

blocks
(
    hex (0 1 16 4 8 9 17 12) (20 20 1) simpleGrading (1 1 1)
    hex (4 16 18 5 12 17 19 13) (20 5 1) simpleGrading (1 1 1)
    hex (5 18 2 3 13 19 10 11) (20 20 1) simpleGrading (1 1 1)
    hex (4 5 6 7 12 13 14 15) (5 5 1) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    leftWall
    {
	type wall;
	faces
	(
	    (0 8 12 4)
	    (5 13 11 3)
	    (7 15 14 6)

	    (6 14 13 5)
	    (3 11 10 2)

	    (0 1 9 8)
            (4 12 15 7)
	);
    }
    atmosphere
    {
        type patch;
        faces
        (
            (16 18 19 17)
	    (18 2 10 19)
	    (1 16 17 9)
	    (0 4 16 1)
	    (4 5 18 16)
	    (5 3 2 18)
	    (8 9 17 12)
	    (12 17 19 13)
	    (13 19 10 11)
	    (7 6 5 4)
	    (15 12 13 14)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //


And here is my setFieldsDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
    volScalarFieldValue alpha.water 0
);

regions
(
    boxToCell
    {
        box (0 0 -0.02) (0.05 0.018 0.02);
        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }
);


// ************************************************************************* //

I do not believe I changed anything else from the damBreak tutorial (which may be the reason I'm having trouble). Thank you again
pbOPEN is offline   Reply With Quote

Reply

Tags
dambreak, setfields, setfieldsdict


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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
rhoSimplecFoam with setFields sino75 OpenFOAM Pre-Processing 0 March 11, 2015 05:08
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 13:13
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 06:44
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 12:00


All times are GMT -4. The time now is 14:17.