|
[Sponsors] |
What changes required to use 2d program for 3d geometry |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 15, 2018, 02:01 |
What changes required to use 2d program for 3d geometry
|
#1 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
For analysis of synthetic jet. to give the motion to vibrating membrane(diaphragm,diameter:50mm) for 2d geometry i used these logarithmic c program. now i wants to do same for 3g geometry.
Is this program work for it. Please give me suggestion if any modification is required. C program: #include "udf.h" DEFINE_GRID_MOTION(logarithmic, domain, dt, time, dtime) { Thread *tf=DT_THREAD(dt); face_t f; Node *v; real NV_VEC(velocity),NV_VEC(axis); real NV_VEC(origin),NV_VEC(rvec); real loco; real freq; real amp; real diam; int n; SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); freq=200; amp=0.0002; diam=0.050; loco=2*3.141592654*amp*freq*cos(2*3.141592654*freq *time); Message("time=%f,omeg=%f\n",time,loco); NV_S(velocity,=,0.0); NV_D(axis,=,0.0,1.0,0.0); NV_D(origin,=,0.0,0.0,0.0); begin_f_loop(f, tf) { f_node_loop(f, tf, n) { v=F_NODE (f, tf, n); if (NODE_POS_NEED_UPDATE(v)) { NODE_POS_UPDATED(v); velocity[0]=loco*(1-(4*NODE_Y(v)*NODE_Y(v))/(diam*diam)+((8*NODE_Y(v)*NODE_Y(v))/(diam*diam))*(log((2*NODE_Y(v)+0.000000000001)/diam))); NV_V_VS(rvec,=,NODE_COORD(v),+,velocity,*,dtime); NV_V(NODE_COORD(v),=,rvec); } } } end_f_loop (f, tf); } |
|
October 15, 2018, 03:33 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
If you want to know if the program works, then try it...
Why ask us? |
|
October 15, 2018, 04:04 |
|
#3 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
sir,
same program not work for 3d. so what should changes required for 3d |
|
October 15, 2018, 04:07 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Can you be more specific than "not work"?
- Does it compile? If not, what happens instead? - Does it give warnings? If so, when and which? - Does it give errors? If so, when and which? - Does it run? - Does it crash? If so, when does it crash? - Does it give wrong results? If so, which? And which results did you expect? If you describe your problem in more details, you will get an answer sooner. |
|
October 15, 2018, 05:35 |
|
#5 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
sir
it give error after pressing RUN divergence detected in AMG solver :x momentum and in second try its show :negative cell volume detected |
|
October 15, 2018, 05:41 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Is the orientation in your 3D-model the same as in your 2D-model?
As in: should the membrane vibrate into the X-direction in both models? |
|
October 15, 2018, 06:34 |
|
#7 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
sir please refer the link. |
|
October 15, 2018, 06:44 |
|
#8 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
No, but thanks.
I am sorry, I was under the false impression that you wanted to get help in solving your problem. I would have been happy to do that. But I now understand that you want somebody else to solve your problem. That is not what I want to do. I am deeply sorry for the confusion. |
|
October 15, 2018, 06:52 |
|
#9 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
thanks sir
|
|
October 21, 2018, 12:12 |
3d synthetic jet
|
#10 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
I change the program for 3d.
But it's show the error msg that is udf library trying to load is not compiled for current platform. I used visual Studio 2017 for as compiler. And some time it's give error fatal error C1189. This is code. Please tell me how to avoid this error.. #include "udf.h" DEFINE_GRID_MOTION(logarithmic, domain, dt, time, dtime) { Thread *tf=DT_THREAD(dt); face_t f; Node *v; real NV_VEC(velocity),NV_VEC(axis); real NV_VEC(origin),NV_VEC(rvec); real loco; real freq; real amp; real diam; int n; SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); freq=200; amp=0.00152; diam=0.050; loco=2*3.141592654*amp*freq*cos(2*3.141592654*freq *time); Message("time=%f,omeg=%f\n",time,loco); NV_S(velocity,=,0.0); NV_D(axis,=,1.0,1.0,1.0); NV_D(origin,=,0.0,0.0,0.0); begin_f_loop(f, tf) { f_node_loop(f, tf, n) { v=F_NODE (f, tf, n); if (NODE_POS_NEED_UPDATE(v)) { NODE_POS_UPDATED(v); velocity[2]=loco*(1-(4*(sqrt((NODE_X(v)*NODE_X(v))+(NODE_Y(v)*NODE_Y(v ))))*(sqrt((NODE_X(v)*NODE_X(v))+(NODE_Y(v)*NODE_Y (v)))))/(diam*diam)+((8*(sqrt((NODE_X(v)*NODE_X(v))+(NODE_ Y(v)*NODE_Y(v))))*(sqrt((NODE_X(v)*NODE_X(v))+(NOD E_Y(v)*NODE_Y(v)))))/(diam*diam))*(log((2*(sqrt((NODE_X(v)*NODE_X(v))+( NODE_Y(v)*NODE_Y(v))))+0.000000000001)/diam))); NV_V_VS(rvec,=,NODE_COORD(v),+,velocity,*,dtime); NV_V(NODE_COORD(v),=,rvec); } } } end_f_loop (f, tf); } |
|
February 23, 2019, 15:12 |
|
#11 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
Hello sir.
I'm trying to do simulation with serial processor and it take to much time for this. So now I'm trying with parallel process (6 core) is there code previous upload code is same apply or any changes required for it to run with parallel processer |
|
February 24, 2019, 16:13 |
|
#12 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
According to you, the previous code gave fatal error C1189 in serial mode.
It would be very strange if it would suddenly work in parallel mode. So: please talk to the tadevilas from October 2018. |
|
February 25, 2019, 03:46 |
|
#13 |
New Member
Vilas
Join Date: Oct 2018
Location: Pune maharashtra,india
Posts: 13
Rep Power: 8 |
Hello sir..
Now the code are run smoothly. I resolve this problem hence now I want to do it by parallel mod |
|
February 25, 2019, 04:13 |
|
#14 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Then... Try it!
If you want help, then give information. What you tried, what went wrong, and so on. We can not look on your screen! |
|
October 16, 2022, 05:33 |
2d analysis of synthetic jet using udf
|
#15 |
New Member
Prasidh shetty
Join Date: Oct 2022
Posts: 10
Rep Power: 4 |
I searched in the learning forum of Ansys and tried to find the course on 2d analysis using UDF, but I did not find a single piece of information related to it [specifically explaining everything related to the moving of the diaphragm using UDF]. Can you please help me with this, my group project is related to the 2d analysis using UDF [Synthetic Jet]. I even searched it on youtube but did not find information in which I would know how to move the diaphragm. this analysis is related to the first case that is quiescent flow.
Your help would be greatly appreciated. |
|
October 23, 2022, 04:46 |
|
#16 | |
New Member
Prasidh shetty
Join Date: Oct 2022
Posts: 10
Rep Power: 4 |
Quote:
1] cannot find open source fie. 2] identifier logarithmic undefined; identifier domain undefined; identifier dt undefined etc 3]expected an expression and there some more ... can help me solve this issue as I am not good at coding |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[DesignModeler] Fill tool - grouping the faces of a complicated geometry? | HeikkiT | ANSYS Meshing & Geometry | 8 | July 20, 2016 08:37 |
Problem Importing Geometry ProE to CFX | fatb0y | CFX | 3 | January 14, 2012 20:42 |
Update boundary conditions calculated by an external program | CedricVH | OpenFOAM | 2 | January 15, 2010 12:55 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
paraFoam reader for OpenFOAM 1.6 | smart | OpenFOAM Installation | 13 | November 16, 2009 22:41 |