|
[Sponsors] |
[swak4Foam] A way to update groovyBC variables during the solution |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 28, 2013, 17:38 |
A way to update groovyBC variables during the solution
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
hi
I was searching for the cause of not changing the results when I change groovyBC variables for all two days and nights! I had run till a important time that a change in BC occurs but it need to change a variable for better simulation.i was changing related variables but nothing seem to change! I simplified it and deleted everything but surprisingly it was not fixed. at last i found that it should be run from starting so that groovyBC can update its variables. then i search for a way to update groovyBC variables and expressions after stopping the solution during a run.is such thing available?or i have to start from zero folder again and again? thanks. Last edited by immortality; January 29, 2013 at 05:14. |
|
January 29, 2013, 05:20 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
is any help available?is it possible by any of groovyBC or pyFOAM utilities?does such thing exist?
|
|
January 29, 2013, 14:54 |
|
#3 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
debugCommonDriver true; debug true;
__________________
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 |
||
January 31, 2013, 14:57 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I forgot to put ; after valueExpression so far.but no error has shown.what may be the cause?
I add these expressions in all groovyBC boundary conditions and get a run? thanks. |
|
January 31, 2013, 16:27 |
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
OpenFOAM doesn't complain about the missing ; as it found the expected string. The next parameters until another ; are ignored because OF believes that they are part of valueExpression
__________________
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 |
|
February 1, 2013, 06:04 |
|
#6 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks.
Should i add two expressions you told me to every groovyBC conditions? I have the problem yet.i have run untill an important time(that moving shock faces to wall and reflects) before it happens i want to change a variable relating to time of opening of the wall(to find a proper value) but no change occurs unless i delete all time step folders and start from begining.is it a true situaion? You mean groovyBC should read 0 folder in each time step again? Thank you. |
|
February 1, 2013, 09:52 |
|
#7 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
If you have problems with implementing dynamic boundary conditions first test them on a tiny "toy-case" that is similar to the real case
__________________
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 |
|||
February 1, 2013, 10:17 |
|
#8 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks.yes I mean that you say.then changing groovyBC variables has no effect on the problem when we are at 100th time step.does it?
I have examined groovyBC by replayTransientBC.the trend seems ok. but something takes place that i think must not be related to groovyBC,the BC is updated after 2 or 3 time steps.is it because time steps are lower than reaching the new condition(wall) to next cell?then i should decrease the size of cells more,shouldn't i? |
|
February 3, 2013, 06:29 |
|
#9 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
1)I found this expression when I used replayTransientBC in my groovyBC's:
Code:
evaluateDuringConstruction 0; |
|
February 3, 2013, 06:35 |
|
#10 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
2)after applying replayTransientBC my p in 0 folder look like this.is it ok?or i should set values for refValue and refGradient and valueFraction?
Code:
right { type groovyBC; refValue uniform 0; refGradient uniform 0; valueFraction uniform 1; value uniform 1.02338e+06; valueExpression "p0_2*pow(par2,-3.5)"; gradientExpression "0"; fractionExpression "(t1<time()&&time()<t1+c1)||(t2<time()&&time()<t2+c1)||(t3<time()&&time()<t3+c1)||(t4<time()&&time()<t4+c1)||(t5<time()&&time()<t5+c1)||(t6<time()&&time()<t6+c1)||(t7<time()&&time()<t7+c1)||(t8<time()&&time()<t8+c1)||(t9<time()&&time()<t9+c1)||(t10<time()&&time()<t10+c1)||(t11<time()&&time()<t11+c1)?1:0"; evaluateDuringConstruction 0; variables 43 ( "ymax=max(pos().y);" "ymin=min(pos().y);" "r=0.02325;" "rpm=32151;" "omega=rpm*pi/30;" "v_r=r*omega;" "w_cell=.004;" "n=1;" "w_w0=n*w_cell;" "w_w1=(115.63-46)*r*pi/180;" "w_w2=(180-159.28)*r*pi/180;" "w_w3=(21.6-0)*r*pi/180;" "w_w4=(83-61.6)*r*pi/180;" "w_w5=(180-128)*r*pi/180;" "w_p1=(160.28-116.63)*r*pi/180;" "w_p2=(71.1-21.6)*r*pi/180;" "w_p3=(46-0)*r*pi/180;" "w_p4=(129-84)*r*pi/180;" "c1=w_p2/v_r;" "c2=(w_p2+w_w4)/v_r;" "c3=(w_p2+w_w4+w_p4)/v_r;" "c4=(w_p2+w_w4+w_p4+w_w5+w_w3)/v_r;" "t1=(w_w0+w_w3-pos().y)/v_r;" "t2=t1+c4;" "t3=t1+2*c4;" "t4=t1+3*c4;" "t5=t1+4*c4;" "t6=t1+5*c4;" "t7=t1+6*c4;" "t8=t1+7*c4;" "t9=t1+8*c4;" "t10=t1+9*c4;" "t11=t1+10*c4;" "p0_1=303975;" "T0_1=440;" "p0_3=932190;" "T0_3=1248;" "p0_2=1023382.5;" "T0_4=973;" "gamma=1.4;" "R=287.14;" "par1=1-(gamma-1)*magSqr(internalField(U))/(2*gamma*R*T0_1);" "par2=1+(gamma-1)/2*magSqr(internalField(U))/(gamma*R*internalField(T));" ) ; timelines ( ); lookuptables ( ); } thanks. |
|
February 4, 2013, 01:56 |
|
#11 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
any answer is thanked and appreciated.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Input parameter not update solution variables? | mariam.sara | CFX | 2 | October 24, 2015 12:05 |
Transient, initial variables from a previous solution | nakor | FloEFD, FloWorks & FloTHERM | 0 | April 22, 2011 05:34 |
Very slow to update solution | Shane | FLUENT | 1 | August 14, 2006 21:29 |
Wall functions | Abhijit Tilak | Main CFD Forum | 6 | February 5, 1999 02:16 |