View Issue Details

IDProjectCategoryView StatusLast Update
0001262OpenFOAM[All Projects] Bugpublic2015-05-01 16:45
ReporterviragAssigned Touser4 
Status resolvedResolutionno change required 
PlatformRHOSOtherOS Version(please specify)
Product Version 
Fixed in Version 
Summary0001262: codeStream
Descriptionthe codedFixedValue feature which is applicable for the applying custom boundary condition is not applicable for trigonometric functions.
I am trying to apply a transient profile at the inlet using codedFixedValue, but it seem to work only for ramping the BC. I want to apply a sine function.

Steps To Reproduceinlet
    type codedFixedValue;
    value uniform 0;
    redirectType ramp;
        operator==(min(10, 0.1*this->db().time().value()));
TagsNo tags attached.



2014-04-07 09:03


Just use 'sin' as you would in any piece of code. E.g. based on the pipeCyclic case:

            const vector axis(1, 0, 0);

            const scalar omega = 10;

            scalar s = sin(omega*this->db().time().value());

            vectorField v(2.0*this->patch().Cf() ^ axis);
            v.replace(vector::X, s);

Issue History

Date Modified Username Field Change
2014-04-06 19:33 virag New Issue
2014-04-07 09:03 user4 Note Added: 0003000
2014-04-07 09:03 user4 Status new => resolved
2014-04-07 09:03 user4 Resolution open => no change required
2014-04-07 09:03 user4 Assigned To => user4