|
[Sponsors] |
SetFieldsDict file problem with 3D multiphase flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 17, 2013, 12:20 |
SetFieldsDict file problem with 3D multiphase flow
|
#1 |
New Member
Gianfranco Vitucci
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
Hello,
I have the following problem using interFoam for a multiphase problem: I want to simulate a 3D water droplet impact on a thin water layer. The domain is a parallelepiped. The thin layer has not a definite form (so I can't use for example BoxToCell to set the layer data on the domain), but I have all the data of alpha1 in the entire domain calculated in a previous simulation. Alpha1 has all the values between 0 and 1. My question is: is there a way to write the data of alpha1 in the setFieldDict file? Thanks |
|
April 22, 2013, 16:18 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
- if both simulations use the same mesh then you only need to copy over the alpha1-file into the 0-directory of the new case and you're done - if they have different meshes you can use the mapFields-utility to map the old solution onto the new grid.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
April 29, 2013, 07:30 |
|
#3 |
New Member
Gianfranco Vitucci
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
Thank you so much for the reply Mr. Gschaider
The mesh-grid is the same for both the simulations. I had just done the step you suggested to do ("if both simulations use the same mesh then you only need to copy over the alpha1-file into the 0-directory of the new case and you're done"), but unfortunately in this case I want to add water droplets to the domain composed by the only liquid thin layer. To add the droplets I have to give the command setFields that reads the setFieldsDict-file in which I created the droplets and in such file I can't write the alpha1 water layer existing domain because it has not a definite form. So the only way to write exactly this file is to modify the existing alpha1-file but I think it is impossible. Thank you so much for your reply |
|
April 29, 2013, 08:45 |
|
#4 | |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14 |
Quote:
|
||
April 29, 2013, 09:35 |
|
#5 |
New Member
Gianfranco Vitucci
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
Exactly.
My initial domain is a cubic biphase domain in which there are only air (alpha=0), a water layer (alpha=1) and the interface between air and water (0<alpha<1). This domain is the ending domain of a previous simulation. At the starting of the previous simulation the water layer was exactly a box, so I used BoxToCell. Now, at the end of the previous simulation the water layer is similar to but not exactly a box and so I can't use BoxToCell. Moreover, In this condition I have to add one droplet with the command SphereToCell, but it is not a problem. |
|
April 29, 2013, 09:57 |
|
#6 |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14 |
I have more or less the same problem, what if we use "zoneToCell"?
I mean what would happen if we define the non-cubic area as a region in the blockmeshDict and in the setFielddict use zoneToCell to mention this area? |
|
April 29, 2013, 12:22 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
April 29, 2013, 13:42 |
|
#8 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
I just read through this thread quick, but I think one thing that hasn't been mentioned is that, I think you would have to make sure you remove the entry:
Code:
defaultFieldValues ( volScalarFieldValue alpha1 0 ); |
|
April 30, 2013, 05:40 |
|
#9 |
New Member
Gianfranco Vitucci
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
@ gschaider:
I tried to do this, but when I add the droplet with setFields, it deletes the existing alpha1 field and sets just the droplet. @ mgdenno: Yes, in fact I tried to delete defaultFieldValues in the setFieldsDict-file but it gives me an error when I use setFields. I think there should be a voice, something like MappedFieldValues or something similar with which I can give the existing alpha1 field in the setFieldsDict-file and then, in the same file, I can add the droplet with SphereToCell, but unfortunately I can't find this term. |
|
April 30, 2013, 07:21 |
|
#10 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
funkySetFields -time 0 -field alpha1 -keepPatches -condition "mag(pos()-vector(0,0,1))<0.1" -expression "1"
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
April 30, 2013, 21:39 |
|
#11 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
For completeness, commenting out just what is inside the brackets:
Code:
defaultFieldValues ( //volScalarFieldValue alpha1 0 ); The attached picture is running setFields on the damBreak case after 0.5 seconds. |
|
May 3, 2013, 07:20 |
|
#12 |
New Member
Gianfranco Vitucci
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
@ mgdenno
YES!!!! That's the solution!!! So easy!!! Thank you so much!! @ gshaider Thank you very much for the precious advices. funkySetFields is a good way to solve these kind of problems but I never used it. Now is the time to learn this function. Thank you |
|
Tags |
interfoam, multiphase, setfieldsdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"parabolicVelocity" in OpenFoam 2.1.0 ? | sawyer86 | OpenFOAM Running, Solving & CFD | 21 | February 7, 2012 12:44 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' | mfiandor | OpenFOAM Installation | 2 | January 25, 2010 10:50 |
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 10 | August 6, 2009 05:26 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |