|
[Sponsors] |
Problem storing values at UDM for tranisient dynamic mesh simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 15, 2016, 04:06 |
Problem storing values at UDM for tranisient dynamic mesh simulation
|
#1 |
New Member
xabi
Join Date: Apr 2015
Posts: 13
Rep Power: 11 |
Hi guys,
I am working on a simulation of a gear rotating inside a tank filled with oil and air just like the attached image. During the simulation I would like to store the moment needed to rotate the gear so I wrote the Compute_Force_And_Moment macro inside my UDF. I would also like to monitor this moment during the simulation so I tried with an UDM but I didn't get reasonable results. I am not really used to work with UDF's so I think it is a problem of the script. Here is the code I am using for the UDF. I am now trying to simulate the same problem without the VOF model (just with one fluid) to make easier the problem.#include "udf.h" Any suggestion? Thank you in advance, any help would be apreciated. Xabi |
|
December 15, 2016, 04:11 |
|
#2 |
New Member
xabi
Join Date: Apr 2015
Posts: 13
Rep Power: 11 |
By the way, here is the contour of the UDM after few time steps.
|
|
December 15, 2016, 08:10 |
|
#3 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
You might try writing a file... like a text file... if you separate the values by "\t", it gets in excel pretty easily... I mean like:
FILE *data; data=fopen("C:\randomAddress\data.txt",w+); fprintf(data,"%g\t%g\t%g\t%g\t%.5g\t",time,x,y,z,m oment); fclose(data); What do you think? would that work? You could also have a message in the log mid-simulation, if you just want to monitor the moment: DEFINE_EXECUTE_AT_END(print_log) { Message("\n****time: %g\tx: %g\ty: %g\tz: %g\tmoment: %.5g\t",time, x,y,z,moment); } |
|
December 15, 2016, 09:14 |
|
#4 |
New Member
xabi
Join Date: Apr 2015
Posts: 13
Rep Power: 11 |
First of all, thank you for your replay.
Yes I think it would work but I also would like to be able to plot it and understand how UDMs work. This model it is just a first attempt to familiarize with this kind of simulation (VOF & UDFs) afterwards, I would like to simulate other things such as losses inside a gearbox and others. I have read in another thread some info about the pointers to the different domains (cell and face) that it might enlighten me a little about using UDM. I'll work a little on that and update the info in case it could be helpful for somebody else. |
|
December 22, 2016, 05:10 |
|
#5 |
New Member
xabi
Join Date: Apr 2015
Posts: 13
Rep Power: 11 |
Hi again,
Finally I have some results on my simulation. I was using wrong the domain ID and the boundary ID. This is the script that I am using now and it is working. #include "udf.h"Hope this would help someone |
|
Tags |
udf, udmi, vof |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
Waterwheel shaped turbine inside a pipe simulation problem | mshahed91 | CFX | 3 | January 10, 2015 12:19 |
Dynamic mesh update problem. | David | FLUENT | 3 | March 15, 2012 06:02 |
Dynamic Mesh Problem | peatmac | FLUENT | 9 | March 14, 2012 07:11 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |