|
[Sponsors] |
alpha1<eps?0:u in compressibleTwoPhaseEulerFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 28, 2014, 17:23 |
alpha1<eps?0:u in compressibleTwoPhaseEulerFoam
|
#1 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
Hello All,
how can I do something like: Code:
volScalarField clipValue(1E-18); volVectorField U1_clip ( IOobject ( "U1_clip", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), alpha1 < clipValue?scalar(0):U1 // clip Ux if alphax <clipValue ); Best regards Wouter |
|
January 29, 2014, 14:57 |
|
#3 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
hello All,
Thank you akidess for your answer. I tried various types (scalar, volScalarField(did not compile), label) for the clipvalue but I probable did not find the right one. The result for U1_clip are (0 0 0) or (0 0.1 0) the first one is what I expected except that it is on unexpected places (alpha1 > 1E-18) and the other one is no good at all because the value of U at those places is (0.00970724 0.0137527 -0.0250987). Something goes wrong with the subtraction or with the multiplication. Could you please give me a direction where to look. best regards Wouter Edit: it did work only I had to place the statements in write.H not in createFields.H. I used : const dimensionedScalar clipValue("clipValue",dimless,1.0e-8) Last edited by wouter; January 29, 2014 at 17:53. Reason: found the solution |
|
Tags |
clip u1 twophaseeuler |
Thread Tools | Search this Thread |
Display Modes | |
|
|