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

setField not working while trying in on an imported geometry

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Rango
  • 1 Post By Rango

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2020, 13:26
Question setField not working while trying in on an imported geometry
  #1
Member
 
Deutschland
Join Date: Sep 2020
Posts: 69
Rep Power: 5
vava10 is on a distinguished road
hey,

I am trying to apply setFields on https://drive.google.com/file/d/10BI...ew?usp=sharing , a background mesh created using Salome and it is not working.
the new alpha.water field file is not being created (No error message is shown in the terminal). following is my setFieldDict

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      ascii;
    class       dictionary;
    location    "system";
    object      setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
    volScalarFieldValue alpha.water 0
);

regions
(
    boxToCell
    {
        box (1 -0.8271 -0.601) (1 -0.8271 0);
        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }

);


// ************************************************************************* //
I would greatly appreciate any help to fix it.
Thank you in advance

Kind regards
vava10
vava10 is offline   Reply With Quote

Old   November 28, 2020, 17:37
Default
  #2
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,

Please double check the coordinates of 'box'. These coordinates define the region for which you want to set alpha.water to 1. In other words, alpha.water value is set to 1 only for cells that their centre lie in the defined box region. In your 'setFieldDict' file, 'box' is defined as a line from z = (1, -0.8271, -0.601) to z = (1, -0.8271, 0).

Cheers
vava10 likes this.
Rango is offline   Reply With Quote

Old   November 29, 2020, 08:31
Question
  #3
Member
 
Deutschland
Join Date: Sep 2020
Posts: 69
Rep Power: 5
vava10 is on a distinguished road
Hey Rango,

when I searched the syntax of boxToCell the syntax came up as

box (<minX> <minY> <minZ>) (<maxX> <maxY> <maxZ>);

I thought it was supposed to be from minimum point ti maximum point till I have set alpha.water as 1.

I think I might be wrong

Can you help?

Kind regards
vava10
vava10 is offline   Reply With Quote

Old   November 29, 2020, 09:48
Default
  #4
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,

The syntax is fine. The dimensions of the box might be the issue. Size of the bounding box is equal to |(maxX - minX) * (maxY - minY) * (maxZ - minZ)|, which in your case is zero! I have attached a simple schematic of 'box' dimensions. Hope this makes it more clear for you.

Cheers
Attached Images
File Type: jpg box.jpg (63.1 KB, 11 views)
vava10 likes this.

Last edited by Rango; November 29, 2020 at 13:02.
Rango is offline   Reply With Quote

Reply


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
[DesignModeler] Regarding error in edges in imported 3D geometry msd ANSYS Meshing & Geometry 0 November 20, 2020 10:54
Surface Faces from imported geometry Miguel Parente STAR-CCM+ 4 November 1, 2017 22:49
[DesignModeler] Creating a body part from an imported geometry tec ANSYS Meshing & Geometry 0 July 27, 2015 07:09
[Salome] how to create geometry with salome to make "IdeasUnvToFoam" working! amorenelchino OpenFOAM Meshing & Mesh Conversion 5 June 24, 2013 10:35
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 04:06


All times are GMT -4. The time now is 10:25.