-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Define Diffusive Mixing Coupling
- Loading branch information
1 parent
9ed5daf
commit d815d98
Showing
14 changed files
with
184 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#pragma once | ||
|
||
#include <olb2D.h> | ||
#include <olb2D.hh> | ||
|
||
namespace arch { | ||
|
||
// Forward declared dependencies | ||
template<typename T> | ||
class Opening; | ||
|
||
template <typename T> | ||
class Node; | ||
|
||
} | ||
|
||
namespace olb { | ||
|
||
template<typename T> | ||
class AdeConcBC : public AnalyticalF2D<T,T> { | ||
|
||
private: | ||
T width; ///< Physical width of the opening. | ||
T xc; ///< The physical x coordinate, xc, of the opening node (center). | ||
T yc; ///< The physical y coordinate, yc, of the opening node (center). | ||
T x0; ///< The physical x coordinate, x0, at which the opening "starts" (bottom for right facing opening). | ||
T y0; ///< The physical y coordinate, y0, at which the opening "starts" (bottom for right facing opening). | ||
std::vector<T> array; ///< Vector that contains the array of concentration values along the opening. | ||
|
||
public: | ||
|
||
AdeConcBC(const arch::Opening<T>& opening, std::vector<T> concentrationField); | ||
|
||
bool operator()(T output[], const T input[]) override; | ||
|
||
}; | ||
|
||
template<typename T> | ||
class AdeConc1D : public SuperPlaneIntegralF2D<T,T> { | ||
|
||
private: | ||
T width; ///< Physical width of the opening. | ||
T xc; ///< The physical x coordinate, xc, of the opening node (center). | ||
T yc; ///< The physical y coordinate, yc, of the opening node (center). | ||
T x0; ///< The physical x coordinate, x0, at which the opening "starts" (bottom for right facing opening). | ||
T y0; ///< The physical y coordinate, y0, at which the opening "starts" (bottom for right facing opening). | ||
std::vector<T> array; ///< Vector that contains the array of concentration values along the opening. | ||
|
||
public: | ||
|
||
AdeConc1D(const arch::Opening<T>& opening, std::vector<T> concentrationField); | ||
|
||
bool operator()(T output[], const T input[]) override; | ||
|
||
}; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <AdeConcBoundary2D.h> | ||
|
||
namespace olb { | ||
|
||
template<typename T> | ||
AdeConcBoundary2D<T>::AdeConcBoundary2D(const arch::Opening<T>& opening, std::vector<T> concentrationField) : | ||
width(opening.width), | ||
xc(opening.node->getPosition()[0]), | ||
yc(opening.node->getPosition()[0]), | ||
x0(xc - opening.tangent[0]*0.5*width), | ||
y0(yc - opening.tangent[1]*0.5*width), | ||
array(concentrationField) { } | ||
|
||
template<typename T> | ||
bool AdeConcBoundary2D<T>::operator()(T output[], const T input[]) { | ||
T s = std::sqrt((input[0]-x0)*(input[0]-x0) + (input[1]-y0)*(input[1]-y0)); | ||
T d = std::sqrt((input[0]-xc)*(input[0]-xc) + (input[1]-yc)*(input[1]-yc)); | ||
T res = width / array.size(); | ||
if (s < width) { | ||
output[0] = array[std::floor(s/res)]; | ||
} | ||
if (0.5*width - d < 0.0) { | ||
output[0] = T(); | ||
} | ||
return true; | ||
} | ||
|
||
template<typename T> | ||
AdeConc1D<T>::AdeConc1D(const arch::Opening<T>& opening, std::vector<T> concentrationField) | ||
: SuperPlaneIntegralF2D<T>() | ||
|
||
template<typename T> | ||
bool AdeConc1D<T>::operator()(T output[], const T input[]) { | ||
|
||
} | ||
|
||
} // namespace olb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.