get position of interface and store it
Hi all,
I am wondering if it might be possible to get and store the interface position to have it avaible for the next time step. The reason is that it would be interesting to have the distance the interface moved within one timestep. With this information the contact line velocity used in the dynamicAlphaContactAngle could be more precise as it is independent of the mesh. I would be glad for any suggestions or comments. Thank you! |
Hi
you can try to store the alpha1 = 0.5 isosurface and then compare it. Just add the following code to the controlDict file. You can also change the surfaceFormat to raw (easier to read). Code:
functions |
Thanks for the hint. So you mean that I then should read the output file from the dynamicAlphaContactAngle..C. Ok, I'll givr it a try and maybe come back with new questions :) thanks!
|
Hi Phicau,
thanks again for your suggestion, it works actually as you said. Do you think it would be possible to get the data as an array e.g. within my C functions? Another problem is, that I only get these information at the timesteps i print out my data, but I need them for every timestep. Thanks in advance! |
Hi
yes, sorry for that, you can change the outputControl value to match your needs: Code:
outputControl timeStep; Reading the files will be easy, since the first line states the number of points and the second one states the format (x, y, z, alpha=0.5). The most difficult part is to calculate the displacement between the surfaces, I hope someone can help you with that. |
Hi!
Ok I get what you mean, so I delete all the results after getting my information except every 1e-05 step for example.. Yeah your right. After having the data from the timestep before I have the difficulty to compute the distance to the current timestep. So maybe I need sth like the 0.5 isosurface of the current timestep.. I'll think about that. Thanks again! |
Hi again,
maybe someone can help me with that question again: in the dynamicAlphaContactAngleFvPatchScalarField.C in the function Foam::dynamicAlphaContactAngleFvPatchScalarField:: theta we start by extracting some values Code:
const fvPatchVectorField& Up, Code:
const fvPatchScalarField& alpha1 |
Hi
I guess that might be possible, you can load the alpha field within the BC by: Code:
const volScalarField& alpha = db().lookupObject<volScalarField>("alpha1"); |
Hi again ;)
thanks for your hint! Then I need to extract the values from the desired patch and delete the other lines.. Allright, I'll give that a try! That's similar to what andrea said. Thanks! |
interface height along a slant wall
I am working to obtain contact line motion in a container. I am thinking of obtaining interface height along a wall and then for velocity, I will take the difference of the location of 2 subsequent timestep divided by time difference. But I am unable to get the location of interface along the slant wall. It would be helpful if anyone can provide any suggestion regarding it.
I have used this code in controldict functions { #includeFunc residuals #includeFunc interfaceHeight interfaceHeight1 { type interfaceHeight; libs ("libfieldFunctionObjects.so"); alpha alpha.water; locations ((0 0 0)); direction (0.0064 0.024 0); } } direction in this I assumed it to be ray from ( 0 0 0) to (0.0064 0.024 0). That's my slant wall direction. Thanks Regards |
All times are GMT -4. The time now is 13:30. |