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

setFields problems

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 3 Post By Phicau
  • 1 Post By Phicau
  • 1 Post By yangzhuan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2017, 08:47
Default setFields problems
  #1
New Member
 
Alice
Join Date: Jun 2017
Posts: 26
Rep Power: 8
yangzhuan is on a distinguished road
Hi,
I just learn openFOAM for a short time. And a problem has been bothering me for a week. Why my setFields is not work. My setFields is that.
defaultFieldValues
(
volScalarFieldValue alpha.water 0
);
regions
(
boxToCell
{
box (0 0 0) (1.0 0.1 0.1);
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

This case is a channel od dimensions 1.00m*0.10m*0.15m(length, width, height). No matter how to change the boxToCell, there is nothing to change. Only the inlet is water. But i want a half water and the rest is air. I have seen many posts here. But there is still no solution. I really nead help.
Thank you!
Attached Images
File Type: png )[(I79%BBYBK)J05GQHZ1%F.png (8.3 KB, 63 views)
yangzhuan is offline   Reply With Quote

Old   July 11, 2017, 08:58
Default
  #2
Member
 
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15
Dipsomaniac is on a distinguished road
Hi Alice

It will help to show the axes and extent of the domain, so that we know where the origin is relative to the domain. setFields works with respect to the origin, and your defined box may actually be outside of the domain of interest.

Regards,
Brian
Dipsomaniac is offline   Reply With Quote

Old   July 11, 2017, 10:09
Default
  #3
New Member
 
Army
Join Date: Jul 2017
Posts: 6
Rep Power: 8
Blanche is on a distinguished road
I think it is that. I also want to ask this question.
Attached Images
File Type: png P[`PO$PC}]I)I{)G)`RA$QV.png (36.3 KB, 54 views)
Blanche is offline   Reply With Quote

Old   July 11, 2017, 10:41
Talking
  #4
New Member
 
Alice
Join Date: Jun 2017
Posts: 26
Rep Power: 8
yangzhuan is on a distinguished road
Quote:
Originally Posted by Dipsomaniac View Post
Hi Alice

It will help to show the axes and extent of the domain, so that we know where the origin is relative to the domain. setFields works with respect to the origin, and your defined box may actually be outside of the domain of interest.

Regards,
Brian


Thanks a lot,
I marked several special points on the Figer. I don't know where is wrong. I hope you can give me some advice.
Thank you again.
Attached Images
File Type: png P[`PO$PC}]I)I{)G)`RA$QV.png (36.4 KB, 32 views)
yangzhuan is offline   Reply With Quote

Old   July 11, 2017, 11:23
Default
  #5
Member
 
Brian Willis
Join Date: Mar 2011
Location: Cape Town, South Africa
Posts: 58
Rep Power: 15
Dipsomaniac is on a distinguished road
can you please run
Code:
checkMesh
and post the results?
Dipsomaniac is offline   Reply With Quote

Old   July 11, 2017, 18:01
Default setFields problems
  #6
New Member
 
Thomas
Join Date: Jul 2017
Posts: 5
Rep Power: 8
Tomatenbart is on a distinguished road
What exactly do you want to be covered in water?

Have you changed your mesh after you firstly executed setFields?
Try deleting your alpha.water file in the 0 folder and get a new fresh one in there, so that in the alpha.water file is no water field set and you don't see any 1 and 0. And then execute setFields again.


Sent from my iPhone using CFD Online Forum mobile app
Tomatenbart is offline   Reply With Quote

Old   July 11, 2017, 22:03
Default
  #7
New Member
 
Alice
Join Date: Jun 2017
Posts: 26
Rep Power: 8
yangzhuan is on a distinguished road
Quote:
Originally Posted by Dipsomaniac View Post
can you please run
Code:
checkMesh
and post the results?

Ok, I run the "checkMesh". The result is that,

Create time
Create polyMesh for time = 0
Time = 0
Mesh stats
points: 126000
faces: 354288
internal faces: 331458
cells: 114291
faces per cell: 6
boundary patches: 4
point zones: 0
face zones: 0
cell zones: 0
Overall number of cells of each type:
hexahedra: 114291
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0
Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).
Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology
in 102 126 ok (non-closed singly connected)
out 459 504 ok (non-closed singly connected)
bimian 18036 18352 ok (non-closed singly connected)
atmosphere 4233 4500 ok (non-closed singly connected)
Checking geometry...
Overall domain bounding box (0 -3.55271e-15 -3.55271e-15) (1000 100 150)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (-2.341e-17 8.36564e-18 -5.38205e-15) OK.
Max cell openness = 1.50386e-16 OK.
Max aspect ratio = 2.71493 OK.
Minimum face area = 8.70147. Maximum face area = 38.3754. Face area magnitudes OK.
Min volume = 51.1851. Max volume = 154.118. Total volume = 1.5e+07. Cell volumes OK.
Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 2.8308e-13 OK.
Coupled point location match (average 0) OK.
Mesh OK.
End
yangzhuan is offline   Reply With Quote

Old   July 11, 2017, 22:25
Default
  #8
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
There you go, your overall domain bounding box is (1000 100 150) and you are filling only (1.0 0.1 0.1).

You need to modify blockMeshDict, either changing the coordinates to metres or add "convertToMeters 0.001;" to it.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   July 11, 2017, 22:32
Default
  #9
New Member
 
Alice
Join Date: Jun 2017
Posts: 26
Rep Power: 8
yangzhuan is on a distinguished road
Quote:
Originally Posted by Phicau View Post
There you go, your overall domain bounding box is (1000 100 150) and you are filling only (1.0 0.1 0.1).

You need to modify blockMeshDict, either changing the coordinates to metres or add "convertToMeters 0.001;" to it.

Best,

Pablo

I use the ICEM to draw the mesh. There is no blockMeshDict. So what should I input in the terminal?
yangzhuan is offline   Reply With Quote

Old   July 11, 2017, 22:35
Default
  #10
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Then run this utility:

transformPoints -scale '(0.001 0.001 0.001)'
floquation likes this.
Phicau is offline   Reply With Quote

Old   July 11, 2017, 22:48
Default
  #11
New Member
 
Alice
Join Date: Jun 2017
Posts: 26
Rep Power: 8
yangzhuan is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Then run this utility:

transformPoints -scale '(0.001 0.001 0.001)'

I have tried. it works. This problem has been bothering me for several days, and finally solved. Thank you for your help. Thank you!
Hope you have a nice day!
Dipsomaniac likes this.
yangzhuan 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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 12:13
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 05:44
InterDyMFoam and problem with setFields chris_sev OpenFOAM Running, Solving & CFD 1 March 23, 2009 21:23
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 11:00


All times are GMT -4. The time now is 15:33.