SetFieldsDict file problem with 3D multiphase flow
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 |
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. |
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 |
Quote:
|
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. |
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? |
Quote:
|
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 |
@ 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. |
Quote:
Code:
funkySetFields -time 0 -field alpha1 -keepPatches -condition "mag(pos()-vector(0,0,1))<0.1" -expression "1" |
1 Attachment(s)
For completeness, commenting out just what is inside the brackets:
Code:
defaultFieldValues The attached picture is running setFields on the damBreak case after 0.5 seconds. |
@ 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 |
All times are GMT -4. The time now is 23:05. |